Adding Extra Required Classes To Oxywind Worker

29 Jun 2022

Use the following code to add extra required classes during Oxywind worker compiling / cache generation when you are ready for production. You may want to do this if you want to use tailwind classes in your HTML code outside of oxygen elsewhere in wordpress or a 3rd party / custom plugin.

This will save classes you need from the purge.

add_filter( 'f!Wakaloka\\Oxywind\\Core\\Worker::content_of_posts', 'hb_tailwind_addclasses' );
function hb_tailwind_addclasses( $content ) {
    $content =  "p-4 flex flex-col p-0 px-4" . " \n" . $content; //example - add classes you need here
    return $content;

Was this article helpful?



Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy