• Resolved sanjayojha303

    (@sanjayojha303)


    Hello again,
    Suki is adding inline style.

    <style id='suki-inline-css' type='text/css'>
    /* Main Dynamic CSS */
    </style>

    How can I remove it?

    I am using child theme and want to keep all css in child style css file. I used few filter and dequeue hooks in child functions.php but could not remove it.

    Is there any hook or filter that I can use it to remove?

    Thanks for such a wonderful free theme.

    Regards
    Sanjay

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

    (@sukiwp)

    Hi Sanjay,

    Dynamic CSS is generated from our theme and it reflects your theme settings (colors, typography, spacing, etc.). If you remove this, you will only see the default styles of the theme.

    Why do you want to remove this?

    Regards,
    David

    Thread Starter sanjayojha303

    (@sanjayojha303)

    Thank you for fast reply david,

    I have copied those generated css and pasted in child theme style.css file. So I don’t want to use them twice.
    I will only use style.css from child theme for customizing and overriding styles.

    Theme Author sukiwp

    (@sukiwp)

    Sorry, but currently there is no available way to remove the inline CSS. We are using wp_add_inline_style function from WordPress to add the inline CSS. But there is no function to remove it.

    We would try something on this and make a solution in the next version.

    Regards,
    David

    Theme Author sukiwp

    (@sukiwp)

    Hi Sanjay,

    We found a solution for this. You can try adding this into your functions.php:

    
    function suki_remove_dynamic_css() {
    	remove_all_filters( 'suki/frontend/dynamic_css' );
    	remove_all_filters( 'suki/frontend/woocommerce/dynamic_css' );
    
    	remove_all_filters( 'suki/frontend/pro_dynamic_css' );
    	remove_all_filters( 'suki/frontend/woocommerce/pro_dynamic_css' );
    }
    add_action( 'wp_enqueue_scripts', 'suki_remove_dynamic_css', 0 );
    
    Thread Starter sanjayojha303

    (@sanjayojha303)

    Thank you David.

    It worked perfectly.

    Theme Author sukiwp

    (@sukiwp)

    You are welcome Sanjay 🙂

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

The topic ‘How to remove the inline style added by theme’ is closed to new replies.