I am creating an addon for Visual Composer through
they seem to work fine, but I have one problem:
they are loaded on every page, and not only in the pages where my addon is used...
How can I make them load only on pages using my addon?
Edit: I found this article that shows how to add some conditions in the place where scripts are enqueued to load them only on specific pages, and one idea (but I'm not really sure) could be to use something similar to:
1) retrieve the page content
2) if certain shortcodes/content is present (my addon specific ones), then
Even if I am still unsure about how even do this, do you think it Would be a good way to solve this properly? Do you have any other suggestions?