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.
- Login to wordpress dashboard.
- Click Appearance —> Theme Editor.
- Select the theme in right drop down list, then click Select button to select it.
- Then navigate to content / content.php file in right side Theme Files area.
- 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' ) ) ); ?-->