Custom Field if Img is empty display nothing.
-
Hi I am trying to figure out something and I am a total newbie in php, please help me with the following codes.
[please follow http://codex.wordpress.org/Forum_Welcome#Posting_Code to keep the code readable]
<h1>Check this Cool Photos of <?php the_title(); ?></h1>
” href=”<?php echo get_post_meta($post->ID, ‘Oneimg’, true); ?>” rel=”lightbox[<?php echo get_post_meta($post->ID, ‘Oneimg’, true); ?>]”><img title=”<?php the_title(); ?>” src=”<?php echo get_post_meta($post->ID, ‘Oneimg’, true); ?>” alt=”<?php the_title(); ?>” />” href=”<?php echo get_post_meta($post->ID, ‘Twoimg’, true); ?>” rel=”lightbox[<?php echo get_post_meta($post->ID, ‘Twoimg’, true); ?>]”><img title=”<?php the_title(); ?>” src=”<?php echo get_post_meta($post->ID, ‘Twoimg’, true); ?>” alt=”<?php the_title(); ?>” />” href=”<?php echo get_post_meta($post->ID, ‘Threimg’, true); ?>” rel=”lightbox[<?php echo get_post_meta($post->ID, ‘Threeimg’, true); ?>]”><img title=”<?php the_title(); ?>” src=”<?php echo get_post_meta($post->ID, ‘Threeimg’, true); ?>” alt=”<?php the_title(); ?>” />
As you can see, I am trying to display 3 images which I set the following key
Oneimg = first image
Twoimg = 2nd Image
Threeimg = 3rd image.If you can help me I would appreciate it a lot. If you havent got what I mean, kindly take a look to the following links
http://enimz.com/green-lantern-2011/ (dont have image)
http://enimz.com/fast-five-fast-and-the-furious/ (have the images)Thanks
- The topic ‘Custom Field if Img is empty display nothing.’ is closed to new replies.