Hi. I am a developer. I understand the concept that Bootstrap is being loaded in the wrong order somehow, and that you need to enqueue it earlier in the chain (later in the chain?), so things all work out nicely. Through a good bit of post reading, I gleaned all that, but I did not see any post that speaks generally of what the principle is. Step 1… find your bootstrap enqueue call… Step 2… copy that code and put it in an action hook function like so… Etc.
Can you give me a few simple steps? Maybe this will help a lot of people. Or please point me to where that would live.
its potentially different on theme by theme basis… and bootstrap is not directly supported by wp since it conflicts with the jquery ui it loads… but many themes ‘get away’ with it if jquery ui is not used on the front end… none the less, the basic rules is:
make sure bootstrap js file is loaded before the wp jquery ui js file…
sounds simple, right? 😉 usually themes (or plugins) will simply load bootstrap when they want and not worry about wp compatibility…
first thing to check is to see if loading the simple press js in the footer will solve it for you… if the theme load bootstrap in the header, then loading our stuff in the footer will make it ‘after’… of course, if another plugin (or the theme) loads jquery ui in the header, it wont help… and it may not if bootstrap js is also loaded in the footer… you can make sure the simple press js is loaded in footer by checking the option on forum – integration – page and permalink…
if that doesnt work, you will need to use the standard wp enqueue system to ensure its loaded in the needed order… as developer, I assume you understand how wp enqueue system works (if not see this)..
another potentially easy fix, when used with loading forum js in footer, is to simply find where the bootstrap js is loaded and ensure that wp loads in the header whether fixed location or using wp enqueue (an option is header or footer load)… see this post for example…
still another potential easy fix is to disable the forum tooltips (usually only helpful if that the is the portion of bootstrap in use)… this can be done with this example..
the problem here may be how the theme (or plugin) loads bootstrap… many ignore wp standards and simply load the js instead of enqueueing it… the second problem will likely be that wp just simply loads jquery ui itself if any plugin/theme adds a dependency for its js on jquery ui (like we do)… so you may have to deregister the wp jquery ui script and then re-enqueue it with a dependency on the bootstrap js that you will register and enqueue..
if still more is needed, probably best to research your theme and figure our where and how its loading the bootstrap js file and we can try to go from there…
This post answers the topic
Thank you, this is very helpful.