[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

WordPress How to remove featured images from posts single pages

This tutorial shows how to remove featured images from posts single pages in WordPress.

WordPress How to remove featured images from posts single pages

By default, featured images are displayed at the top of single post pages:

WordPress._How_to_remove_featured_images_from_posts_single_pages-1

In order to hide featured images on single post pages, you need to modify the post-thumb.php file. To make such change, please follow the steps listed below:

  1. Download and open up the wordpress/wp-content/themes/themeXXXXX/includes/post-formats/post-thumb.php file and locate the line 25 (approximately). There you’ll see the following PHP code:

     
    			echo '<figure class="featured-thumbnail thumbnail '.$figure_class.'" >'.$post_image_before.'<img '.$image.' alt="'.get_the_title().'" >'.$post_image_after.'</figure>';
    		

    This code echoes (outputs) featured images onto single post pages.

  2. Wrap the code mentioned above in a if(!is_single()) condition. You should get the following result:

     
    			if(!is_single()) {
    			echo '<figure class="featured-thumbnail thumbnail '.$figure_class.'" >'.$post_image_before.'<img '.$image.' alt="'.get_the_title().'" >'.$post_image_after.'</figure>';
    			}
    		

    WordPress._How_to_remove_featured_images_from_posts_single_pages-2

  3. Save the changes in the wordpress/wp-content/themes/themeXXXXX/includes/post-formats/post-thumb.php file and upload it to the server.

    The final result should look like this:

    WordPress._How_to_remove_featured_images_from_posts_single_pages-3

Feel free to check the detailed video tutorial below:

WordPress How to remove featured images from posts single pages