Load scripts and style in a ajax/pushstate based theme
-
Is there some recommended way to make the plugin load its necessary scripts and styles when used in the context of a pjax/ajax/pwa/no hard reload website?
For now I’ve been tinkering but it does not work as I would want and I’m wondering if some people would have some insights to share about this.
My issue is simple: if visit directly a page that has Buddypress components, it loads its styles and scripts properly, but not if I visit the homepage for example and then navigate to a Buddypress page. Then the server does not know it has to load.
I’d like either to find a JS way to load the scripts and styles.. or to force BuddyPress to load them in everypage (community pages are a big part of the project)
- You must be logged in to reply to this topic.