I use a custom WordPress theme that uses AJAX to load pages. As you can imagine, this can create an instance where the site is loaded onto a page that does not use Visual Composer (VC), and then the part loads another page that makes us VC, since resources are not required for the finished download.
So far, the only solutions I've been thinking about are using VC on every page (which is not so good for messages and custom message types) or adding a VC page to the footer (unchecked).
I looked deeper into the code of the plugins and found that it was wp_enqueue_script()called in many files from what looked logical, calling the correct extensions / add-ons for VC as needed, perfect sense.
My solution is that one could use PHP to solve this problem, to name only the basic requirements of VC, since none of the galleries or anything special will be used.
Does anyone know how to get VC to load resources onto every page or have any experience? Thanks!
source
share