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.

Comments are closed.

Find any information about marketing, tips, online earning on this site

Custom Search
laptop and computer store
revresponse

Recent Comments:

  • marketing niche strategy: Affiliate marketing is an excellent way for any business to market the products and...
  • datafeedr coupon code: In order to be prosperous in affiliate marketing, you have to design your site in such a way...
  • free online games for kids: GAMERS DREAM T-SHIRT. THIS IS A SWEET PLAYER FOUND T-SHIRT FOR ALL YOU HALO AND ONLINE...
  • Dann Monat: This can be the most useful article I’ve browse all year. GREAT stuff, many thanks!
  • Denita Minock: Great article, I must say I never scan something that summed it up therefore well. Something like this...

Recent Trackbacks: