favorite image with custom field
-
I’m using
<?php if( get_post_meta($post->ID, "favorite", true) ): ?> <img src="<?php echo get_post_meta($post->ID, "favorite", true); ?>"> <?php endif; ?>
in my loop to add a favorite icon image to certain posts. I put favorite as the key, then the link to the image in the value.
Is there anyway I can tell it to use the same image each time so I just need to put true instead of the image url?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘favorite image with custom field’ is closed to new replies.