Custom Fields – How to Display Default Image?
-
I’m currently using custom fields to display thumbnails on my homepage. Here is the code I am using below:
<img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="alt text" />
Basically what I want to know is how to display a default image should custom field be left blank and an image is not specified.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Fields – How to Display Default Image?’ is closed to new replies.