• Resolved hovenberg

    (@hovenberg)


    Hi, I import some fonts in my style.css via @font-face from the local server and add “font-display: swap;”.

    After viewing the siteground optimizer minified version of the css file it has removed the “font-display: swap;”.

    I’d like sg optimizer to leave that in it.
    Any possibility to achieve that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support kuzmanstoyanov

    (@kuzmanstoyanov)

    Hello @hovenberg,

    There are 2 possible reasons I could think of:

    1. You are seeing a cached version of the minified CSS file. Please, make sure to clear SiteGround Optimizer’s cache, the cache of your browser and the cache stored by other caching plugins, if any.

    2. If the issue persists even after you flushed all caches, then it is probably caused by the “Minify CSS Files” feature. When such issues occur, our plugin allows you to exclude CSS scripts from this feature. You can exclude a CSS script in the SiteGround Optimizer interface in your WordPress Dashboard:

    Note that the drop-down menu lists only CSS scripts added through the default WordPress hooks. If your script is missing in the drop-down, you should exclude it by adding the following filter in your active theme’s functions.php:

    add_filter( 'sgo_css_minify_exclude', 'css_minify_exclude' );
    function css_minify_exclude( $exclude_list ) {
        // Add the style handle to exclude list.
        $exclude_list[] = 'style-handle';
    
        return $exclude_list;
    }

    Here you should replace “’style-handle” with the actual handle of your CSS script. This post explains how to find the CSS handle and exclude it.

    If you are a SiteGround client, you can submit an inquiry in the Help Desk. This way the Technical Support team will be able to access your site, preview the code and assist you properly.

    Best Regards,
    Kuzman Stoyanov

    Plugin Support kuzmanstoyanov

    (@kuzmanstoyanov)

    Hello @hovenberg,

    We haven’t heard from you for almost a week, so we are marking this case Resolved.

    Do not hesitate to contact us back if you experience other issues with SiteGround Optimizer!

    Best Regards,
    Kuzman Stoyanov

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SG Optimizer removes font-display’ is closed to new replies.