How to Fix CLS (Cumulative Layout Shift) in WordPress

This guide covers “fix cls” in plain language. Cumulative Layout Shift (CLS) measures how much visible content jumps around while a page loads. Annoying shifts make people tap the wrong button. A good CLS is 0.1 or less. Here is how to track down and fix layout shifts in WordPress.

Common causes

  • Images and videos without set dimensions
  • Ads, embeds and iframes that load late
  • Web fonts swapping and changing text size
  • Banners, cookie notices and popups injected at the top
  • Sliders that resize as they load

Find layout shifts

  • PageSpeed Insights lists the elements that shifted.
  • Chrome DevTools has a Layout Shift Regions option in rendering tools.
  • Record a Performance trace to see shift events.

Fixes

1. Always set width and height on images

This lets the browser reserve the right space before the image loads. WordPress adds dimensions to images in most cases; check images inserted via custom HTML. Use CSS aspect-ratio for flexible containers.

2. Reserve space for embeds and ads

Give iframes, videos and ad slots a fixed or aspect-ratio container so content below does not jump.

3. Handle fonts carefully

Use font-display: swap or optional, preload key fonts and choose fallback fonts with similar metrics to reduce the swap shift.

4. Avoid inserting content above existing content

Place cookie bars and announcement banners in reserved space or overlay them instead of pushing the page down.

5. Stabilize sliders and carousels

Set a fixed height or ratio so the area does not collapse and expand.

6. Animate with transforms

Animate with transform and opacity, not properties that change layout.

7. Check your theme and builder

Some themes load CSS late, causing reflow. For example, choose a theme that renders predictably with CSS in the head.

Re-test

Verify on mobile as well as desktop, since layouts differ.

Related: Core Web Vitals for WordPress, optimizing images and CSS breakpoints.

Fix CLS FAQ

What is a good CLS score?

0.1 or less at the 75th percentile of real visits.

Why is CLS worse on mobile?

Narrow layouts reflow more and ads or banners take proportionally more space.

Related reading

Keep reading

Tutorials

How to Create a Wedding Planner Website With AI (Step-by-Step Guide)

Build a wedding planner website with AI: portfolio of real weddings, packages, inquiry forms, testimonials and local SEO.

Tutorials

How to Add a Contact Form to WordPress (3 Ways, Step by Step)

How to add a contact form to WordPress with a form plugin, a page builder with a built-in form builder, or custom code, plus tips to stop spam and ensure delivery.

Tutorials

How to Create a Roofing Company Website With AI (Step-by-Step Guide)

Build a roofing contractor website with AI: project galleries, free inspection forms, storm damage pages, warranties and local SEO.

Tutorials

How to Create a Therapist or Counselor Website With AI (Step-by-Step Guide)

Build a therapist or counseling practice website with AI: warm messaging, specialties, fees and insurance, privacy-aware contact forms and local SEO.

Tutorials

How to Export a WordPress Site to Static HTML (4 Methods)

Four ways to turn a WordPress site into static HTML files, with pros, cons and what stops working when you go static.

Tutorials

How to Build a Website From Scratch: A Complete Beginner’s Roadmap (2026)

How to build a website from scratch: plan, domain, hosting, design, content, SEO and launch. A complete beginner's roadmap with no coding required.

Browse by topic: Tutorials · Comparisons · AI Website Building · Website guides by industry