Return to Snippet

Revision: 20039
at November 5, 2009 04:13 by gd6d


Initial Code
<?php $thereisimage = get_post_meta($post->ID, image, true);
if($thereisimage){ ?>
	<a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, image, true); ?>" alt="Image" /></a>
<?php }else{ ?>
	<a href="<?php the_permalink() ?>"><img src="images/default.png" alt="Default Image" /></a>
<?php } ?>

Initial URL
http://forthelose.org/how-to-use-custom-fields-in-wordpress

Initial Description

                                

Initial Title
Use Custom Fields in Wordpress

Initial Tags
wordpress

Initial Language
PHP