Display image on front page with custom field
« Build e-Commerce website« »Create Magazine Theme for Wordpress »
There is two ways to display image on our web page, with img tag and with custom field. I say about wordpress blog software. Yes, with custom field we can display many image on the from page on the first section of post content. This placement usually used for headline news, or list of news. We can modify wordpress template so we can use as magazine website.
Like this blog, is more like a website than w blog. This website is built with wordpress blog engine. But, you can see, I can separate each category in diferent section. Ican add many image on many post list.
This is the script to display image with custom field:
the code:
<?php $picture = get_post_meta($post->ID, “image”, $single = true); if($picture !== ”)
{ echo ‘<img src=”‘. $picture .’” width=”275″ alt=”‘; the_title(); echo ‘” />’; }
else { echo ”; }
posted on
on Saturday, March 14th, 2009 at 6:19 pm
under Wordpress Tutorial
RSS 2.0 feed.
Both comments and pings are currently closed.


