• I’m using quite a lot of plugins on my wordpress site and I love them all. One of them is WPG2 which embeds my gallery into a wordpress page. Unfortunately, all those plugins make everything quite slow, especially the gallery page.

    I was wondering if there’s a way to only call the WPG2 plugin and not all the other ones since they’re not used on the gallery page. This will stop all sorts of stylesheets and javascripts to be loaded.

    It doesn’t only go for the WPG2 plugin the main question is: Is there a way to have control on which plugin loads on a certain theme (using php templates)?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter gsjosh

    (@gsjosh)

    Can anybody give me a clue?

    I don’t think you can selectively load plugins. You can edit the plugin such that it doesn’t load things like javascript or css except on certain pages.

    Thread Starter gsjosh

    (@gsjosh)

    And how would I do that? I have looked for something like that but I guess my talent of searching isn’t good. Can you point me in the right direction?

    Probably start here. Then browse Google’s returns for ‘wordpress javascript’. You are going to have to figure out how the plugin loads its scripts and css and then filter it. The simplest, not necessarily the best, way is to wrap the code in a is_page('whatever') {...} conditional.

    Thread Starter gsjosh

    (@gsjosh)

    Thank you very much for the help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Calling plugins separately’ is closed to new replies.