Is changing theme helps reducing CLS?


I am using a lightweight theme that is pure Java Script but I am facing the issue of CLS. First, it was due to Auto Ads which I have disabled. That helped in reducing CLS but still showing error in Search Consol.

My question is do changing theme help in reducing CLS.

Thanks in advance.

There are lots of factors that can affect cls and theme is one of them…

If your theme has moving elements, dialogue box, popups or anything that can make the content move from its place then cls is going to be high.

Another common problem is missing height and width attributes of images. This causes cls issues as well.

Get instant 30% improvement using this plug-in

I Will check this. Saurav

When I am testing in Lighthouse even with throttle speed CLS is almost zero but in Search Consol, it is more than 0.5. So really getting frustrated.

I didn’t disable but instead using classic editor plugin.

If disable Gutenberg will it increase the performance?

Does your source code contains wp-includes/css/dist/block-library/style.min.css? and, are you using Classic Editor?

(The block Editor CSS is often unused for the Classic Editor user. It affects the intial page load time.)

Then you should install above plugin. Alternatively, use this filter.

I did a CTRL+U source code check but didn’t find the above code that you mentioned.

Should I add the below code in functions.php file?

// remove block css
function remove_block_css() {
wp_dequeue_style( ‘wp-block-library’ );
add_action( ‘wp_enqueue_scripts’, ‘remove_block_css’, 20 );

// disable for posts
add_filter(‘use_block_editor_for_post’, ‘__return_false’, 10);

// disable for post types
add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 10);

You should not add that code snippet in theme functions.php because when you’ll update your theme it will be vanished. Therefore, use Code Snippets plugin to manage all snippets at one place.

Thanks bro. Will check that.

You’re welcome!

It’s didn’t worked. CLS is still 0.60.

Theme is one major culprit. Along with plugins for popup and all.

Before theme change:

After theme change:

I changed the theme on one of my website. (Progress Update For My Blog:-Month 6 Update(Ads are up) - #95 by saurav_556) This is the one.

I changed it this week and above are the result of before and after. It can still be improved. But I am happy with that for now so I shifted my focus to the content again.

Please note the website runs mediavine ads as well. The mobile score of PSI is above 90 and desktop is 99.

Here is the theme I moved to. Its still in closed beta but i got an invite for that.


Ok, thank you for sharing.

Recently theme builders are working to reduce CLS and yes, changing the theme can help in reducing the CLS score. You can use, Generate Press, Thrive Theme Builder (ShapeShift), and Elementor as an alternative…
Start checking by disabling all plugins and test CLS.

1 Like

Already using GP premium.

I too recommend Generate Press Premium Theme.

Getting good speed :grinning:

Make your site globally faster and secure with my new plugin

My scores, trick it do it yourself (my own theme)

Does Gutenberg slows down the website?