• Resolved queso

    (@queso)


    I was wondering if there was currently a way to adjust the order of loading of resources while keeping in the same section.

    Ex. I know with the pro version resources can be moved from the header to the footer, but what if there are 10 CSS files loading in the header and I just want to adjust 1 to load before the other?

    (and yes I know these can be done by adding custom code to the functions.php but that’s no fun and not the benefit of a plugin) 🙂

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @queso this feature is not available as the order in which the CSS/JS files are loading is set in the plugin’s theme based on the priority set in the add_action() for ‘wp_enqueue_scripts’. Usually, plugin developers are adding a certain order for a reason. Moreover, this is partially achieved by setting dependencies when using wp_enqueue_script() or wp_enqueue_style(). For instance, any script that has array('jquery') set in the dependencies parameter will load after jQuery library which makes total sense.

    To be honest, this has rarely been an issue and I don’t recall having it requested before. There are workarounds around it when you really have to load a resources before the other (or vice-versa). In these rare cases, I would recommend editing functions.php, but I understand you prefer to do it via a plugin for convenience, especially if you manage lots of websites.

    The plugin is already feature-rich and some consider it complicated enough. This feature might be implemented in a special section for advanced developers if necessary. It all depends on what most of the users need/want. Currently, there are other features that have been requested and they are a priority in getting released in the near future.

    Happy winter holidays!

Viewing 1 replies (of 1 total)

The topic ‘Prioritizing Resource Loading WITHIN the Same Section’ is closed to new replies.