• I use the theme BlankSlate and creates most pages with Elementor.

    As for now, my CSS hierarchy goes like this:

    Theme > plugins (mainly, Elementor) > Child theme.

    How to load all CSS from plugins, as last in hierarchy?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I don’t think you can automate this. Is it easy for you to do this manually? I.e. dequeue the plugin stylesheets from within your Child Theme functions.php file and then re-enqueue them within the order you want?

    Thread Starter Won’tsharehere

    (@benosika)

    It is easy for me to do this manually but I would like to automate this (maybe even via WP-CLI via cron, each minute).

    About dequeue/enqueue, I don’t know exactly what you mean. Even if I do so, how could I make sure it is loaded right after my page builder (Elementor)?

    Moderator bcworkz

    (@bcworkz)

    You should be referencing all external stylesheets by calling wp_enqueue_style() from within a callback added to “wp_enqueue_scripts” action (for front end pages anyway). The function accepts a dependency array parameter where you can specify other registered stylesheet handles that should be loaded before your stylesheet.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to load all plugins CSS after child theme CSS?’ is closed to new replies.