• Resolved Michael Adamidis

    (@azzurres)


    Hi everyone,

    I have tried so many things, to become green numbers for core vitals especially for LCP and FCP and nothing has worked. Also not the inline critical CSS..

    Per accident I have clicked on “inline all css”, even when it’s not recommented, but LCP and FCP have both come from 2,1 to 0,9 and I am so happy about that..

    Now (as it is already mentioned in AO desciption), when sharing a page, there is no featured image to be seen.

    Is there any work around method to bring that thing to work? I would be so happy for a solution.
    Will it affect also the meta desciptions? Right now I haven’t a seo plugin, but in case I will use one.

    Thanks,
    Michael

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Sure, you can use below code snippet to tell AO to inject the CSS just before the closing title tag;

    function override_css_replacetag( $replacetag ) {
        return array( "</head>", "before" );
    }
    add_filter( 'autoptimize_filter_css_replacetag', 'override_css_replacetag', 10, 1 );

    hope this helps,
    frank

    Thread Starter Michael Adamidis

    (@azzurres)

    Hi Frank,

    can’t wait to test this out, as this could be the last step of making it work.

    Just to be sure: This is a function to be inserted in the functions.php right? I don’t use a child theme till now.

    Can I use a slim plugin like Custom Functions for that?

    Thank you so much!
    Michael

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    don’t know “custom functions”, but the code snippets plugin most certainly works like a charm for this, so if “custom functions” is similar, you’re good to go 🙂

    Thread Starter Michael Adamidis

    (@azzurres)

    I can’t believe my eyes, it’s working perfect now!
    Yes, I had Code Snippets installed and used it.

    I was fighting this for months now.
    In my case, this option for inlining all css was the ultimate game changer.

    You can replace WP-R with other plugins to reach it quite good, but there is no replacement for the things AO does.

    Thank you for your amazing support, Frank.
    From tomorrow on, I can go back finally doing art again..!

    Best,
    Michael

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

    Thread Starter Michael Adamidis

    (@azzurres)

    Done!

    Thread Starter Michael Adamidis

    (@azzurres)

    Frank, this is maybe interessting for you:

    I have deactivated (for testing) now the “Aggregate JS-files?” + “Inline all CSS”, activated; and I have also a big improvement of TBT and TTI from 2,8 to 1,3 sec on some pages!

    Maybe it would be a good written recommendation for “Inline all CSS”, to deactivate “Aggregate JS-files” while in use. Just an idea to test, you are the expert!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Yeah, but in that case the JS is render-blocking, which would impact other KPI’s (e.g. FCP/ LCP) , so this might not work for everyone .. but good to know it works well for you 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Inline ALL CSS’ is closed to new replies.