Removing Featured Image from post and search result wordpress [Solved]

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 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; ?>
-->

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 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; ?>
-->

Feel free to comment/provide some other solutions….

PHP Recommended Books:

447 total views, 1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *