• Resolved Prima

    (@bl0gm4n)


    How to remove that inline stylesheet from Source Code?

    Can you share some code snippet for removing that css, so i can copy and remove that css and place it on my child-theme stylesheet.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Tom

    (@edge22)

    That CSS is generated by your settings in the Customizer.

    If it bothers you, I would suggest using Autoptimize as shown here: https://generatepress.com/fastest-wordpress-theme/

    That will remove it for you, and will also speed your site up ??

    Hy, tom thanks for this great themes.

    But I only want to remove that CSS and add to my child theme css manually,

    So i don’t need to use !important tag on my css.

    I know this will remove costumizer functionality, but i don’t use it often.

    can you share some code to remove this inline css from <head> ?

    Thread Starter Prima

    (@bl0gm4n)

    Hy, tom thanks for this great themes.

    But I only want to remove that CSS and add to my child theme css manually,

    So i don’t need to use !important tag on my css.

    I know this will remove costumizer functionality, but i don’t use it often.

    can you share some code to remove this inline css from <head> ?

    Theme Author Tom

    (@edge22)

    You could try a function like this:

    add_action( 'after_setup_theme','tu_remove_dynamic_css' );
    function tu_remove_dynamic_css() {
    	remove_action( 'wp_enqueue_scripts', 'generate_color_scripts', 50 );
    	remove_action( 'wp_enqueue_scripts', 'generate_spacing_scripts', 50 );
    	remove_action( 'wp_enqueue_scripts', 'generate_typography_scripts', 50 );
    	remove_action( 'wp_enqueue_scripts', 'generate_secondary_color_scripts', 80 );
    	remove_action( 'wp_enqueue_scripts', 'generate_background_scripts', 70 );
    }
    Thread Starter Prima

    (@bl0gm4n)

    Wow, Great Support.

    Thanks Tom ??

    Theme Author Tom

    (@edge22)

    You’re welcome ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Inline Style from HTML’ is closed to new replies.