How to add fetchpriority to first 2 images in wordpress?

you can use this filter to add attributes too. e.g. like that with you own counter : add_filter(“wp_get_loading_optimization_attributes”, function ($loading_attrs, $tag_name, $attr, $context) { if (!isset($GLOBALS[“MY_PLUGIN”][“fetchpriority_count”])) { $GLOBALS[“MY_PLUGIN”][“fetchpriority_count”] = 0; } if ($GLOBALS[“MY_PLUGIN”][“fetchpriority_count”] < 5) { $GLOBALS[“MY_PLUGIN”][“fetchpriority_count”]++; $loading_attrs[“fetchpriority”] = “high”; } return $loading_attrs; }, 10, 4);

Initial Connection takes 42 seconds

First I would visit a single file in the browser, like an image file, to see if the server loads that quickly or not. If the image loads slowly, you will know it is a server speed problem. But if the image is fine, most likely there will be a PHP code slowing the website … Read more

Optimise page loading time faster on WordPress using Genesis child theme [closed]

There are plenty of ways to improve the speed of your WordPress site Irrespective of theme/ plugins you have used. Add caching plugin supercache which will show tremendous decrease in the speed loading time of your site. Put Following script in your sites .htacces file # BEGIN EXPIRES ExpiresActive On ExpiresDefault “access plus 10 days” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)