Ready to get started?Download WordPress


Replace add inline style with export to stylesheet (1 post)

  1. mak1wp
    Posted 3 months ago #


    Is it possible to make styles print to an external stylesheet?
    I have a plugin which uses a function to generate CSS - and then it prints it on the page (over 500 lines!) At the bottom of the function is this

    wp_add_inline_style( 'css-widgets', $custom_css );

    Is it possible to replace add_inline_style with something to send this information to an external stylesheet - and then enqueue the stylesheet - instead of having tones of css printed on the page?

    Many thanks!


You must log in to post.

About this Topic