WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mak1wp
    Member
    Posted 3 months ago #

    Hello,

    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!

Reply

You must log in to post.

About this Topic