WordPress.org

Forums

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

  1. mak1wp
    Member
    Posted 1 year 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!

Topic Closed

This topic has been closed to new replies.

About this Topic