Removing Featured Image from post and search result wordpress [Solved]
Removing Featured Image from post and search result wordpress:
1. Comment the below snippet from the single.php (in some themes file names may vary. (vantage theme -> content-single.php))
[php]
<!– <?php if( has_post_thumbnail() && siteorigin_setting(‘blog_featured_image’) ): ?>
<div class="entry-thumbnail"><?php the_post_thumbnail( is_active_sidebar(‘sidebar-1’) ? ‘post-thumbnail’ : ‘vantage-thumbnail-no-sidebar’ ) ?></div>
<?php endif; ?>
–>
[/php]
If you comment the above snippet, it will remove the thumbnail or featured image only from the post. But still it will exist in the post search page.
2. Comment the below snippet from the search.php (in some themes file name may vary)
Search under entry-header section then comment the below lines, then it will not be displayed even in post search page.
[php]
<!– <?php if( has_post_thumbnail() && siteorigin_setting(‘blog_featured_image_type’) == ‘large’ ): ?>
<div class="entry-thumbnail">
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail( is_active_sidebar(‘sidebar-1’) ? ‘post-thumbnail’ : ‘vantage-thumbnail-no-sidebar’ ) ?></a>
</div>
<?php endif; ?>
–>
[/php]
Feel free to comment/provide some other solutions….
PHP Recommended Books: