• Resolved smwc

    (@smwc)


    I see in the FAQ example that you can disable the plugin on certain pages via a filter. Is it possible to disable the plugin on a specific set of templates (perhaps using is_page_template()) without passing in page IDs as well? We have a number of custom page templates that will never use photoswipe, so it makes more sense to just disable the plugin on those pages than to manually opt-out every page that uses them. If it’s possible, could you provide an example of how that would work?

    • This topic was modified 4 years, 9 months ago by smwc.
Viewing 1 replies (of 1 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    Of course you can also do checks using is_page_template() without using the post ID at all. Just try it to find out if it fits your needs.

    However keep in mind that the filter has do be defined with the post ID as parameter since plugin will call it this way, even if you don’t use the ID.

Viewing 1 replies (of 1 total)
  • The topic ‘Disabling the lightbox on specific templates’ is closed to new replies.