To fix Cumulative Layout Shift (CLS) in WordPress, you give images, videos and ad slots fixed sizes, load fonts without a jump, avoid content that appears late and animate only with transform. A CLS of at most 0.1 counts as good.
You know the feeling: you want to tap a button, but just before that the content jumps down and you click on something completely different. That is exactly what Cumulative Layout Shift, or CLS for short, measures. It is one of the three Core Web Vitals and evaluates the visual stability of a page. If you want to Fixing CLS you have to find out which elements shift and why. In this article you will learn the typical causes in WordPress, get concrete solutions and a checklist to tick off.
You will find the overall picture in Improving Core Web Vitals. We cover the other two metrics in Improving LCP and Improving INP.
What CLS measures and how it is calculated
Every time a visible element moves without any action by the user, a layout shift occurs. For each shift, the browser calculates a value from two factors: how much of the screen is affected (impact fraction) and how far the elements move (distance fraction). Instead of endlessly adding up every shift across an entire session, Google only evaluates the worst so-called session window: a timeframe of at most five seconds in which individual layout shifts occur no more than one second apart.
The thresholds
- Good: up to 0.1
- Needs improvement: 0.1 to 0.25
- Poor: over 0.25
CLS has no unit like seconds. It is a pure ratio. A value of 0.1 occurs, for example, when an element shifts 20 percent of the visible screen by half the screen height (0.2 times 0.5 equals 0.1). Shifts are especially annoying when visitors are just about to read or click. Shifts that happen directly after a user action, such as when opening a menu, do not count.
The most common causes of layout shifts in WordPress
- Images and videos without fixed dimensions
- Web fonts that load late and change the text size
- Ad banners, embeds and iframes without reserved space
- Cookie banners that push the content down
- Notice bars, newsletter boxes and pop-ups that appear later
- Dynamically loaded content such as reviews, product prices or search results
- Sticky headers that change their height while scrolling
- Animations that change position or size
Step 1: Find the shifting elements
Before you can change anything, you need clarity about the culprits. Use these tools:
- PageSpeed Insights: Under “Diagnostics” you will find the entry “Avoid large layout shifts” with a list of the affected elements.
- Chrome developer tools: Using the tracks under “Experience” in the “Performance” tab and the “Layout Shift Regions” option in the “Rendering” tab, you can make shifted elements directly visible (the exact step-by-step guide follows below).
- Search Console: The Core Web Vitals report shows which URL groups fail in real-world user data. Learn more about interpreting the metrics in Understanding PageSpeed Insights.
- Simulate a slow connection: With a throttled network, shifts are much more noticeable, because everything loads in more slowly.
Step 2: Give images and videos fixed sizes
This is the most common single cause. If the browser does not know how big an image will be, it reserves no space. As soon as the image has loaded, everything below it slides down.
Width and height in the code
Modern WordPress versions automatically set the width and height attributes on images inserted via the media library. The aspect ratio is then reserved. Problems arise with images inserted via page builders, backgrounds or custom HTML. Check in the source code whether the attributes are present, and add them manually or enable the “Add missing image dimensions” option in your performance plugin.
Set the aspect ratio with CSS
For videos, maps and embeds, you can use the CSS property aspect-ratio (for example, .video-wrapper { aspect-ratio: 16 / 9; width: 100%; }) to create a frame with a fixed ratio. The browser then reserves the area before the content arrives.
Also applies to logos and icons
The logo in the header can also jump if it loads without dimensions, shifting the navigation or making the header taller. Define both width and height, or set a fixed height with a matching aspect ratio.
Step 3: Load web fonts without a jump
When a font loads late, the browser swaps the fallback font for the real one—an effect known as Flash of Unstyled Text (FOUT). If the two fonts have different character widths or line heights, the entire text block shifts. This can be mitigated:
- Host fonts locally: This saves the connection to external servers, speeds up page delivery and protects you from GDPR compliance issues with external font servers.
- Use WOFF2: The smallest format with full support.
- Preload important fonts: The browser fetches them earlier.
- font-display: swap or optional: With swap, text appears immediately; with optional, the font is only used if it is ready within roughly 100 milliseconds—otherwise the system font stays active on the first visit and the web font is cached for subsequent pages. This avoids any late swap completely.
- Adjust the fallback font: With the CSS properties size-adjust (for example, size-adjust: 104%), ascent-override and descent-override inside the @font-face rule, a system font can be matched so closely to the web font that the swap is barely noticeable.
- Fewer font weights: Two to three are usually enough.
Step 4: Reserve space for ads, embeds and widgets
Everything that is loaded late from third-party servers can shift the content: ad banners, YouTube videos, embedded maps, social media posts, review widgets or external newsletter forms.
- Give the container a fixed minimum height (min-height) that corresponds to the later size.
- For ads, use the largest expected ad height as reserved space.
- Replace YouTube embeds with local preview images inside a fixed 16:9 container that only load the actual player after a click.
- Do not place dynamic elements above existing content.
In online stores in particular there is a lot to consider, such as dynamic price displays or stock notices that are updated by script. Find more optimization tips in WooCommerce too slow.
Step 5: Integrate cookie banners, notice bars and pop-ups properly
A cookie banner that appears at the top and pushes the page down creates a large layout shift. Solutions:
- Display the banner as an overlay at the bottom edge or as a floating window that does not shift the content.
- If it has to be at the top, reserve the space from the start.
- Deliver notice bars (“Summer break until August 15”) in the initial HTML instead of inserting them via script.
- Show pop-ups only after a few seconds or on user action and design them as an overlay.
Step 6: Build animations and effects properly
Animations that change height, width, spacing or position shift neighboring elements. Use the CSS properties transform and opacity instead. They are calculated directly on the graphics card's compositor thread, skipping the layout phase and preventing shifts. Typical examples are fade-ins when scrolling, hover effects and moving elements. On Elementor sites it is worth taking a close look at entrance animations, as covered in Elementor page speed.
Step 7: Load dynamic content cleanly
When content is loaded later, such as “More posts” or search suggestions, the new content should appear below the visible area or in a frame reserved beforehand. Skeleton placeholders, i.e. gray blocks at the later size, convey loading progress and avoid shifts. Avoid pushing existing content down just because something new appears above it.
Practical example: CLS from 0.34 to 0.04
A company site with Elementor, a cookie banner and an embedded video had a mobile CLS of 0.34. The analysis revealed four culprits:
- The cookie banner pushed the content down by about 90 pixels at the top (about 0.15).
- The embedded YouTube video had no fixed size (about 0.10).
- The web font visibly swapped out the fallback font (about 0.05).
- A logo without a height specification shifted the navigation (about 0.04).
After switching to an overlay banner, a 16:9 frame for the video, local fonts with font-display: optional and a fixed logo height, the CLS was 0.04. No major rebuilds were needed, only attention to detail. The numbers serve as an example.
CLS with Elementor, Gutenberg and other page builders
Page builders create layouts from many nested containers. That is convenient but brings typical pitfalls. With Elementor it is worth checking whether background images in sections have a fixed height, because otherwise the loaded image determines the height. Animations of the “Fade in from below” type can also cause shifts if they change the position before they are finished. Use animations sparingly and test them on mobile. In the Gutenberg block editor, images, cover blocks and embedded media are mostly unproblematic as long as you set the sizes via the media library. Embedded HTML blocks with iframes without a fixed height are critical.
Another classic is sliders and carousels. They often load the first image without a size and jump as soon as the script is initialized. Set a fixed height or aspect ratio for the slider container and consider replacing it entirely with a single image. That also helps LCP.
Sticky headers, menus and the navigation bar
Many themes shrink the header on scrolling or switch to a sticky variant. If the height of the bar changes in the process, the content below shifts with it. Solution: always reserve the larger height for the header or position the sticky version with position: fixed so that it does not affect the flow. Also check whether the menu on the phone changes its height after loading because a script only shows the burger icon late. A menu that first appears as a normal list and then collapses is a common source of shifts in the upper part of the page.
Step by step: Find layout shifts in the developer tools
- Open the affected page in Chrome and press F12.
- Switch to the “Rendering” tab (via the three-dot menu under “More tools”) and enable “Layout Shift Regions”.
- Reload the page. Elements that jump are briefly highlighted in blue.
- Switch to the “Performance” tab, choose the throttling “Slow 4G” and the CPU throttling “4x slowdown”, start a recording and reload the page.
- In the timeline you will find red markers for layout shifts under “Experience”. A click shows you in the lower area which nodes moved and how much.
- Note the three biggest culprits and work through them one after another. Test again after every change.
This method takes less than ten minutes and gives you a concrete to-do list instead of leaving you guessing in the dark.
CLS on blog posts and magazine pages
Blog posts contain many images, quotes, embedded videos and sometimes ads. Assign a size to every image, embed videos via a frame with a fixed aspect ratio and load comment sections and review widgets only further down. Also watch out for tables of contents that are generated by script: if a table of contents only appears at the start of the text after loading, it pushes the entire post down. A server-generated table of contents that is in the HTML from the start and reserves its space is much better. Learn how to structure content for search engines and AI Overviews in SEO for AI.
CLS in online shops
Shops have additional risks: prices that are only shown by script, stock notices, discount banners, product galleries and cart icons that display a number after loading. Reserve the space for these elements from the start by giving them a fixed height or minimum width. Pay attention to uniform aspect ratios for product images, because mixed formats in a grid easily lead to shifts when images arrive one after another.
Mobile particularities of CLS
On the phone, columns wrap below each other, images are scaled and menus change. That is why CLS on mobile often differs significantly from desktop. Check different screen widths, such as 360, 390 and 768 pixels, and pay special attention to the upper part of the screen. That is where the shifts with the greatest weight occur, because they affect the largest part of the visible area. Also test with cookie consent enabled and without it, as the two states behave differently.
Monitoring: Keeping CLS under control in the long run
After the optimization you should check CLS regularly. New plugins, a changed theme or a fresh ad format can bring back old errors. Set a fixed date, for example a look at Search Console once a month. Document which measures you implemented so that you can quickly find the cause if things get worse. If you would rather hand this off, use Maintenance.
Which measure delivers how much?
- Fixed sizes for images and videos: high impact, low effort
- Cookie banner as an overlay: high impact, low effort
- Space for ads and embeds: medium to high impact, medium effort
- Optimize fonts: medium impact, medium effort
- Rebuild animations: small to medium impact, low effort
Typical CLS mistakes
- Checking only the desktop: On the phone the layout often shifts more, because columns wrap and images scale differently.
- Lazy loading without sizes: Delayed loading without reserved space causes shifts while scrolling.
- Checking only the lab value: The lab does not know many real shifts, for example from ads or late scripts. The field value is what counts.
- Too many optimization plugins: Aggressively delaying or removing supposedly unused CSS often leads to a Flash of Unstyled Content (FOUC) and thus to severe layout shifts.
Checklist to tick off
- Do all images have width and height or a fixed aspect ratio?
- Do videos, maps and embeds have reserved space?
- Are fonts loaded locally as WOFF2 and provided via preload?
- Is font-display set and the number of font weights small?
- Does the cookie banner not push the content down?
- Are notice bars and pop-ups displayed without shifting?
- Do animations use only transform and opacity?
- Was it tested on the phone with a throttled connection?
When professional help is worth it
Many layout shifts are quickly fixed once you know the culprit. It gets harder with theme structures, ad networks or scripts you cannot control yourself. Our Pagespeed Boost at $149 finds the culprits and fixes them cleanly. So that new plugins or updates do not destroy the stability again, Maintenance at $99 per month is a good fit. If you first just want to know where you stand, the free check.
CLS on multilingual websites
Multilingual sites bring their own layout pitfalls. Texts in different languages have different lengths: a short menu item that fits easily on one line in English (such as “Contact”) might wrap in the German translation (“Kontaktformular”). As a result, the navigation bar grows taller and pushes the rest of the page down.
So test every language version individually and not just the main language. Pay special attention to buttons, menus, headings and prices, because that is where different lengths show up most. Give buttons and headers a minimum height and enough room so that longer texts do not trigger a line break.
Language switchers and translations loaded later
Some JavaScript-based translation solutions swap texts in the browser only after the page has loaded. The original language then appears first and jumps to the target language shortly after, which worsens the CLS. Check in a test whether the page appears in the right language right away when the English version is opened.
A language switcher in the header should also reserve its space, for example with a fixed width for the selection field. That keeps the header stable in every language.
Conclusion: Stable pages build trust
Layout shifts are annoying for visitors and easy to avoid once you know the causes. Give images and embeds fixed sizes, load fonts cleanly, reserve space for banners and ads and animate only with transform. That way you keep your CLS permanently below 0.1 and give visitors a calm, reliable user experience. You will find further levers for overall speed in our guide WordPress slow? The most common causes.
Frequently asked questions about CLS
What is a good CLS value?
A value of up to 0.1 counts as good. Between 0.1 and 0.25 there is room for improvement, above that it is poor. Here too the 75th percentile of real visitors counts.
Why does the lab value show a different CLS than the field data?
The lab loads the page once and does not scroll like a real visitor. Shifts caused by ads, late scripts or interactions often do not appear there. The field value summarizes the real behavior of all visitors.
Do shifts after a click also count toward CLS?
No. Layout changes that happen within 500 milliseconds after a user input are considered expected and are not counted.
How do I find out which element jumps?
PageSpeed Insights lists the culprits under “Avoid large layout shifts”. In the Chrome developer tools you make the areas visible with “Layout Shift Regions” in the “Rendering” tab.
Is it enough to give images width and height?
That is the most important step, but not the only one. Fonts, ads, banners and dynamic content must also be checked.
Does CLS affect my Google ranking?
It is part of the Core Web Vitals and therefore a signal for page experience. More important still: jumping pages lead to mis-clicks, frustration and higher bounce rates.
Can a caching plugin worsen CLS?
Yes, indirectly. If CSS is aggressively delayed or combined, the page first appears unstyled and then jumps. Test after every change to the optimization.
How long does it take until the value improves in Search Console?
The data covers 28 days. So expect about a month until the improvement shows up completely.
What does a CLS of 0 actually mean?
A value of 0 means that nothing on the page shifted unexpectedly. That is the ideal; in practice, values of 0.1 or less are enough for the rating “good”.
Should I disable lazy loading for images to avoid shifts?
No. Lazy loading makes sense as long as the images have reserved space. The problem is missing size information, not delayed loading.
How do ads affect CLS?
Ad slots are often filled late and come in different sizes. Reserve the largest possible height for each ad position so that the content does not jump.