I am running a WordPress site and created a custom theme. Now I’m stuck with optimizing it for Google PageSpeed
. It shows the following for the Mobile page:
Consider Fixing: Only about 63% of the final above-the-fold content could be rendered with the full HTML response
This appears since I’ve included the Featured Image
above my posts on the index.php with the code:
<p> <?php if ( has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> </p>
How can I fix the issue? It doesn’t seems to me that I’m loading something like a sidebar before the featured image, apart from the logo of the site. For a deeper comprehension, here the complete code of my index.php
<?php get_header(); ?> <div id="main"> <div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <p> <?php if ( has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> </p> <h1> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php the_title(); ?> </a> </h1> <p> <?php the_content(__(' <br /> <br /> Weiterlesen →')); ?> </p> <hr> <?php endwhile; else: ?> <p> <?php _e('Sorry, no posts matched your criteria.'); ?> </p> <?php endif; ?> <?php if (show_posts_nav()) : ?> <div class="pagination"> <?php echo paginate_links(); ?> </div> <?php endif; ?> </div> <?php get_sidebar(); ?> </div> <div id="delimiter"> </div> <?php get_footer(); ?>
Can someone help me with this issue? What am I doing wrong?