Default featured image for post
-
Hi
I am using WP Show Post Plugin to show my post in grid and using lite version of Generatepress theme. I want to set default featured image(fallback image) for posts which user missed to add/set featured image.
I have tried following code:
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { ?> <img src="<?php bloginfo('template_directory'); ?>/images/my-image.jpg" alt="<?php the_title(); ?>" /> <?php } ?>
But because of the plugin’s classes/function I guess I am not able to achieve results.
- The topic ‘Default featured image for post’ is closed to new replies.