优先考虑可见内容Wordpress

Mar*_*eyk 5 php wordpress pagespeed

我正在运行一个Wordpress网站并创建了一个自定义主题.现在我一直坚持优化它Google PageSpeed.它显示了Mobile页面的以下内容:

考虑修复:只有大约63%的最终首屏内容可以使用完整的HTML响应进行呈现

这是因为我Featured Image在index.php中包含了上面的帖子,代码如下:

<p>
  <?php if ( has_post_thumbnail() ) : ?>    
    <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
      <?php the_post_thumbnail(); ?>
    </a>
  <?php endif; ?>
</p>
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?在我看来,除了网站的标志之外,我在特色图片之前加载的是侧边栏.为了更深入的理解,这里是我的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(); ?>
Run Code Online (Sandbox Code Playgroud)

有人可以帮我解决这个问题吗?我究竟做错了什么?