This members-only tutorial provides the steps to make custom CSS file(s) load earlier or before Oxygen generated styles (universal.css and page-specific CSS files).

Before:

After:

We are going to use Oxygen Sass plugin as an example.

Step 1

Replace

add_action( 'oxygen_enqueue_scripts', 'os_enqueue_scripts' );
/**
 * Loads compiled style.css in Oxygen editor and on the frontend.
 */
function os_enqueue_scripts() {
	if ( class_exists( 'Wp_Scss' ) ) {
		wp_enqueue_style( 'wp-sass', plugin_dir_url( __FILE__ ) . '/css/style.css', array(), CT_VERSION );
	}
}

with

This is a premium members-only content.

To view the rest of the content, please sign up for membership (one-time payment for lifetime access).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: