Prioritize visible content wordpress

New Page

Prioritize Visible WordPress Content

Try running a WordPress site and creating a custom theme. Ahora estoy atascado with the optimization for Google PageSpeed. Muestra lo following for the Móvil page:

Consider correcting: only alrededor del 63% of the final content of the top scrap of the page to be represented with the complete HTML answer.

Esto aparece is that it includes Featured Imagemis publications anteriores en index.php con el código:

1

2

3

4

5

6

seven

<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 solve the problem? No me because esté cargando algo así como un barra lateral antes de la imagen destacada, aparte del logotipo del sitio. For a deeper understanding, aquí el código completo de mi index.php

1

2

3

4

5

6

seven

8

9

ten

11

12

13

14

15

dieciseis

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

<?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 /> Further →’ )); ?>

         </p>

         <h>

 

       <?php endwhile; otherwise: ?>

         <p>

           <?php _e( ‘Sorry, no article matches 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(); ?>

¿Podría alguien ayudarme con este asunto? ¿Qué estoy haciendo mal?

Categories php Tags speed of página , php , wordpress Mensaje de navegación

docker error: input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty’

“Unordered types: int() < str()”

Prioritize Visible WordPress Content

Ask a question

Asked 6 years, 10 months ago

Modified 6 years and 2 months ago

Seen 6k times

Esta pregunta muestra el esfuerzo de investigación; it is useful and clear

4

Esta pregunta no muestra ningún esfuerzo de investigación; no está claro o no es util

Guarda esta pregunta.

Mostrar actividad en esta publication.

I’m using a WordPress site and I created a custom theme. Now I’m stuck with optimizing for Google PageSpeed. It displays the following for the Mobile page:

Consider fixing: only about 63% of the final content above the fold could be rendered with the full HTML response

This appears since I included the featured image above my posts on 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>

Comment puis-je résoudre le problème ? Il ne me semble pas que je charge quelque chose comme une barre latérale avant l’image sélectionnée, à part le logo du site. Pour une compréhension plus approfondie, voici le code complet de mon 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 /> Further →’)); ?> </p> <hr> <?php endwhile; else: ?> <p> <?php _e(‘Sorry, no item matches 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?

  • php
  • wordpress
  • pagespeed

Cuota

Comparte un enlace a esta pregunta

Copiar link CC BY-SA 3.0

Follow

Follow this question to receive notifications

editado el 8 de agosto de 2016 a las 8:03

Martín Teik

preguntado el 22 de noviembre de 2015 a las 18:38

Martin Teyk user avatar

Martín Teyk Martín Teyk

41 1 1 insignia de plata 3 3 bronze badges

Add a comment  | 

1 Answer 1

Sorted by: Reset to default

Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first)

This answer is useful

3

This answer is not useful

Save this answer.

Show activity on this post.

As someone who holds a 100/100 pagespeed score, I can tell you that over-optimizing for speed is probably not worth the frustrations you’re going to run into fixing the problems. Case in point, run a Pagespeed test on Wikipedia or YouTube. These are top sites and YouTube only has a score of 50, for example. The real reason you’d want to improve these numbers is to provide a better experience to users because they don’t have to wait for the page to load.

Your above the fold content is simply what is allowed to be displayed while waiting on additional resources to load:

Your page has 4 blocking script resources and 2 blocking CSS resources. This causes a delay in rendering your page. None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML. Remove render-blocking JavaScript: /…-includes/js/jquery/jquery.js?ver=1.11.3 /…s/jquery/jquery-migrate.min.js?ver=1.2.1 /…ghtbox/jquery.touchwipe.min.js?ver=1.4.6 /…ightbox/jquery.lightbox.min.js?ver=1.4.6 Optimize CSS Delivery of the following: /wp-content/themes/1000PB/style.css /…ghtbox/styles/lightbox.min.css?ver=1.4.6

Your efforts are better spent optimizing the delivery of these (using async or defer for scripts and stylesheets) as these will lower your overall page speed score and hurt your search engine rankings .

To answer your question, however, you can inspect the elements that are at the top of your page, usually anything that can be seen without scrolling down, to see their css. Example:

img.attachment-post-thumbnail { border: 1px solid #e6e6e6; padding: 3px; }

So it’s best to include these elements in an inline <style> element in the header, because then the browser won’t have to wait for style.css to load before it can display the page to users.

If you need help with hacking your WordPress theme to do certain things to make it faster, such as minifying scripts, making scripts asynchronous, using defer, disabling emoji, and so on, just ask in comments or submit another question and we will be glad to help.

Pantalla capture of PageSpeed ​​punctuation

I recommend testing on other sites to get a better idea of what’s going on. I recommend Webpagetest.org and using a Waterfall chart will tell you which resources are taking the longest:

Waterfall chart from Webpagetest.org

You can also use tools to help with this: CSS Tricks: Authoring Critical Above-the-Fold CSS Critical-path (Above-the-fold) CSS Tools

Share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

edited Nov 22, 2015 at 22:06

answered Nov 22, 2015 at 21:41

jaggedsoft user avatar

jaggedsoft jaggedsoft

3,627 1 1 gold badge 32 32 silver badges 40 40 bronze badges

4

  • Good morning! Thank you for your reply! It was really helpful! But I’m just a bit confused – I tried doing inline CSS for the critical content above the fold, but that didn’t fix the problem – when I remove the code to display the featured image above the single posts on the homepage, the message “Priority to visible content” disappears. But I want to show the picture. Is it perhaps not a problem of CSS, but of the structure of my php code in the index.php file (code see above)? Thank you for your help!

    – Martin Teik

    November 23, 2015 at 3:44 PM

  • 1

    Prioritize visible content is only a mild warning, if you view your pagespeed you will see that “Eliminate render-blocking JavaScript and CSS in above-the-fold content” has a big red exclaimation point meaning it’s much more important. In other words, making your scripts load asynchronously will have more of a benefit. I must say though, your site loads very fast for me and I’m all the way in California USA. Your site is fine, it works good. I wouldn’t remove functionality from your site due to speed concerns. Make an awesome site first and optimize it

    –  jaggedsoft

    Nov 23, 2015 at 16:46

  • Hi NextLocal, thanks for your post. Having my page at a score of 90% will cause glitchy / unfinished rendering on slower internet speeds. Silly is that the page seems to be more likely showing up at a rating of 60 than at my actual ~90. I guess the kitchen is messed up by critical section. right now js is loaded async, that works as expected (I hope), but page fold still plays tricks with me :/ is there anything you can read out? webpagetest.org/result/170226_D5_1ZVB/1/details/… thanks in advance

    –  Martin Pfeffer

    Feb 26, 2017 at 16:38

  • 1

    Hi @MartinPfeffer your website looks very good and loads extremely fast for me. Unfortunately I can not provide CSS debugging for you, but your page is fast enough to get high rankings so if further optimizations are causing you problems it’s best to leave it as it is, where everything is still easy to work on.

    – jaggedsoft

    27 Feb 2017 at 5:45 PM

Add a comment | 

Your answer

Thanks for contributing an answer to Stack Overflow!

  • Por favor, asegúrese de responder a la pregunta. ¡Proportione detalles y comparta su investigation!

Pero avoided…

  • Pedir ayuda, aclaraciones o responder a otras respuestas.
  • Hacer declaraciones basadas en la opinión; respaldarlos con referencias o experience personal.

To obtain more information, consult our consejos sobre cómo escribir excelentes respuestas.

Saved Draft

Draft rejected

Sign up or log in

Sign up with Google

Sign up using Facebook

Sign up using your email and password

Send

Publish by invitation

Number

Email

Requerido, pero nunca mostrado

Post as guest

Last name

E-mail

Required, but never displayed

Publica tu respuesta Desechar

Al hacer clic en “Publicar su respuesta”, acepta nuestros términos de servicio , política de privacidad y política de cookies

No es la respuesta que estás buscando? Explorar otras preguntas etiquetadas

  • php
  • wordpress
  • velocidad de página

o haga su propia pregunta .

  • El blog de desbordamiento
  • Conoce a la IA que te ayuda a elegir qué ver a continuación

  • Una charla con Matt Hicks de Redhat en su camino de desarrollador a CEO (Ep. 494)

  • Destacado en Meta
  • Los marcadores se han convertido en guardados

  • Cambios recientes de contraste de color y actualizaciones de accesibilidad

  • ¡Revisor por la borda! O una solicitud para mejorar la guía de incorporación para nuevos…

  • Actualización de colectivos: miembros reconocidos, artículos y GitLab

  • ¿Debo explicar las respuestas de solo código de otras personas?

Related

633

Can I install/update WordPress plugins without providing FTP access?

0

Added inline wordpress comment functionality to non-wordpress page

6

add page to sidebar

4

simple php counter

0

WordPress entry-content empty, php code in div returns nothing

0

targeting and posting blocks of quotes from posts

0

Use the_post() outside the loop

Preguntas calientes of the red

  • ¿Se trata `/dev/null` de manera different a otros archivos cuando se tablece la option `noclobber`?
  • ¿Hasta qué punto juega la calidad de los datos en la precision de un modelo?
  • Subsecuencias con valores distintos
  • ¿Parece correcta the confirmation of Taleb de epidemias con un recuento de muertes de > 1,000 que se encuentran en los cientos más bajos (en los últimos 2,500 años)?
  • Implementing dynamic types in C
  • Its subdomains of web sites that come with “www”. y las que no empiezan por “www”. una y la misma cosa?
  • Is ¿Cuándo es hProp equivalent to sub-object classifier?
  • Series of books leida in the decade of 2010 sobre una mujer, un asesino y un orco que debe cruzar la lava.
  • Película en la que una mujer investigates la muerte/desaparición de la tripulación de una nave espacial varada en algún lugar del universo
  • Eliminate casos para patrones que requieren buscar múltiples puntos en una lista
  • ¿Cómo defender a los aliados como luchador en el nivel 1?
  • Elección of “eso” versus “él/ella”
  • ¿Cómo puede un solo attack de cuchillo causar 61 days?
  • Armadura natural vs Armadura de mago, ¿cuál tiene prioridad?
  • Generator/fuente de aleatorios físicos stupid numbers: ¿qué es esto?
  • ¿Cuál fue la primera cosa really grande que apareció en la ciencia ficción?
  • No se pueden crear archives o directorios que commencen desde ‘com1’ hasta ‘com9’
  • Tener molestias con el sillín, no estoy seguro if es por la altura del sillín o por la posición incorrecta del asiento
  • ¿Qué día de la semana era?
  • ¿Por qué la ley no tiene en cuenta la probabilidad?
  • ¿Cuál es la primera instantia en la ficción publicada que muestra un elemento del futuro viajando en el tiempo por sí mismo?
  • ¿Which suburb of Bangkok is in the closest proximity to the city’s most popular attractions?
  • (Matemáticas) ¿Cómo preguntar a los professores sobre su trabajo cuando solo tienes una vaga comprensión de su área temática?
  • ¿Qué número extra trained?

Feed of preguntas

Subscribe to an RSS

Feed of preguntas

To subscribe to an RSS feed, copy and follow this URL as an RSS reader.

WordPress Q and A > Blog > Beginner’s Guide > Prioritizing WordPress Visible Content

Beginner’s Guide

Prioritize Visible WordPress Content

Adam

Beginner’s Guide November 20, 2021

Last update: April 2, 2022


Video Prioritize visible content wordpress

Related Posts

Free chat room code for my website

Contents1 How to set up a free chat room on the website.2 3 comentarios2.1 Trackbacks/Pingbacks2.2 Submit a Comment Cancel reply3 How to Create a Chat Room Website…

Background image full screen css

Contents1 Cómo – Full Page Image1.1 Example1.2 Example2 CSS background image tamaño tutorial: how to codify a complete page background image3 Perfect Full Page Background Image3.1 Méthode CSS géniale,…

WordPress leverage browser caching

Contents1 Aproveche el almacenamiento in hidden del navegador1.1 Will it works for my website?1.2 Where are plugin options1.3 Some JavaScript files still display under Leverage Browser Caching1.4…

WordPress post to facebook page

Contents1 How to Automatically Post to Facebook from WordPress1.1 Download Now: How to Launch a WordPress Website [Free Guide + Checklist]1.2 1. Create an IFTTT account.1.3 2….

Download images from wordpress media library

Contents1 How to export your WordPress media library1.1 Download maintenant : How to launch a WordPress website [Free Guide + Checklist]1.2 How to export your WordPress media…

WordPress single post template

Contents1 How to Create Custom Unique Post Templates in WordPress2 Post Template Files2.1 author.php2.2 Fecha.php3 Handbook navigation4 How to Create Custom Single Post Templates in WordPress5 Video…