Title: Inline ALL CSS
Last modified: February 20, 2022

---

# Inline ALL CSS

 *  Resolved [Michael Adamidis](https://wordpress.org/support/users/azzurres/)
 * (@azzurres)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/)
 * 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
    -  This topic was modified 4 years, 1 month ago by [Michael Adamidis](https://wordpress.org/support/users/azzurres/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finline-all-css-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15384481)
 * 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](https://wordpress.org/support/users/azzurres/)
 * (@azzurres)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15384664)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15384729)
 * don’t know “custom functions”, but [the code snippets plugin](https://wordpress.org/plugins/code-snippets/)
   most certainly works like a charm for this, so if “custom functions” is similar,
   you’re good to go 🙂
 *  Thread Starter [Michael Adamidis](https://wordpress.org/support/users/azzurres/)
 * (@azzurres)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15384936)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15385537)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 *  Thread Starter [Michael Adamidis](https://wordpress.org/support/users/azzurres/)
 * (@azzurres)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15386672)
 * Done!
 *  Thread Starter [Michael Adamidis](https://wordpress.org/support/users/azzurres/)
 * (@azzurres)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15387187)
 * 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](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15387210)
 * 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.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/inline-all-css-2/#post-15387210)
 * Status: resolved