How To Hide WordPress Featured Image In Post Index Page

Each wordpress post has a featured image, and the featured image will be shown in wordpress home page above each post title. But at some time this image is not necessary and will cost page load time, so we need to hide it in wordpress home page to increase page load speed. This article will tell you how to implement it by editing wordpress source code.

1. Hide WordPress Post Featured Image In Index Home Page Steps.

Below is the steps to hide the featured image in home page, it will edit the theme source code. It do not need to install any thirdparty plugin. Use plugin will make your wordpress website run slowly.

  1. Login to wordpress dashboard.
  2. Click Appearance —> Theme Editor.
    wordpress - dashboard - appearance - theme editor
  3. Select the theme in right drop down list, then click Select button to select it.
    wordpress - dashboard - appearance - theme editor - select theme - content.php file
  4. Then navigate to content / content.php file in right side Theme Files area.
  5. Click it to edit it’s content and comment the code which will display the featured image as below.
    <?php else : // If not viewing a single post. ?>
    <!-- comment below code to not display post featured image in index page to improve page speed. -->
    <!--?php get_the_image( array( 'size' => 'stargazer-full', 'order' => array( 'featured', 'attachment' ) ) ); ?-->

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.