Categories

Featured templates

WordPress. How to remove featured images from posts single pages

Guillaume Dumas June 29, 2015
Rating: 5.0/5. From 2 votes.
Please wait...

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

Expensive Wordpress Themes
This entry was posted in WordPress Tutorials and tagged featured, image, page, post, single, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket