http://animefreakz.net/wp-content/uploads/2011/03/bgthum.png Im need to php coding will any one help me with this code. <?php if(get_post_meta($post->ID, "thumbnail", true)) : ?><a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" /></a><?php endif; ?> PHP: ok it gets the thumbnail value which is a img link. what if theres no value for thumbnail? how can i rewrite that code so if there is no value for thumbnail default would be http://animefreakz.net/wp-content/uploads/2011/03/bgthum.png PHP:
<?php if (get_post_meta($post->ID, "thumbnail", true)) : ?> <a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID, 'thumbnail', true); ?>" /></a> <?php else : ?> <a href="<?php the_permalink(); ?>" class="thumb"><img src="http://animefreakz.net/wp-content/uploads/2011/03/bgthum.png" /></a> <?php endif; ?> PHP: ** I'm by no means a Wordpress expert and had no chances to test this but it should work as expected.
Client Management System THANK YOU I see what I did wrong now I just had else not <?php else : ?> mixing up java with php..