[Resolved] Cumulative Layout Shift (CLS) bad index

  • Author
  • #16352

    Feliciano B.V.

    to improve the Google index “Cumulative Layout Shift (CLS)”, I need to remove the fonts:


    Or Preload web fonts, or include “font-display: swap” in the @font-face style.

    How can I do it?



    Andrew Misplon

    Hi Feliciano

    Thanks for reaching out.

    I’m not sure font-display has a valid place when it comes to icon fonts. I don’t know that the tool being used can tell the difference between a font used for normal text and a font used for icons. A more detailed explanation of the issues surrounding font-display and icons can be found here: https://www.zachleat.com/web/font-display-icon-fonts/.

    To remove the icon font family, the following can be inserted using the Code Snippets plugin or a child theme functions.php file:

    function polestar_child_dequeue_assets() {
      wp_dequeue_style( 'polestar-icons' );
    add_action( 'wp_enqueue_scripts', 'polestar_child_dequeue_assets', 11 );

    If using Code Snippets you can set the snippet to run on the site front end only. Save and Activate when done.

    The icons that will no longer be available can be seen here: https://github.com/purothemes/polestar/blob/develop/css/polestar-icons.css#L26-L142.


    Feliciano B.V.
    This reply has been marked as private.

    Andrew Misplon

    Hi Feliciano

    Glad to help.

    Do you have drop-down menu items? Would you like to remove the down arrow that will be missing if you use the function above?

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Cumulative Layout Shift (CLS) bad index’ is closed to new replies.

Scroll to top