• Brent

    (@colourstone)


    Hi, great plugin! Thank you.

    I use multisite and I’m glad you added support for that. I use separate CSS files for different sites that use the same theme.

    My issue is that I need to set a priority for my JS & CSS files. My CSS files need to load “LAST” in the head right before the closing head. (‘</head>’)

    I need to enqueue files like so:
    ‘(‘wp_enqueue_scripts’, ‘high_priority_style’, ’98’);’
    ‘(‘wp_enqueue_scripts’, ‘high_priority_style’, ’99’);’
    ‘(‘wp_enqueue_scripts’, ‘high_priority_style’, ‘100’);’

    Would it be to much to ask if you could add this into the plugin? Simply add: ‘, ‘XXX” at the end of each script.

    Thank you!
    Brent

    https://wordpress.org/plugins/wp-enqueue/

Viewing 1 replies (of 1 total)
  • Plugin Author Serge Boyko

    (@boykodev)

    Hi, I glad you like the plugin.

    The thing is that in current version of the plugin all scripts are enqueued first and all styles are enqueued after already.
    It means that all wp_enqueue_scripts() functions are called before wp_enqueue_styles() functions.
    Therefore, styles must be already prioritised as you need, but for some reason WordPress still loads CSS files before JS files.

    Can you explain me the difference if CSS file is loaded after JS?
    In my experience there is no difference to put it before or after JS.
    Maybe some modifications to your JS files could help.

Viewing 1 replies (of 1 total)

The topic ‘Need to set High Priority for CSS’ is closed to new replies.