• I’ve found the the Lightbox only seems to work on Pages, and Posts. It will not work on Custom Post types. Can this be changed?

    I’m building a site with Divi and the lightbox works on Posts, but not on the Projects CPT that comes with the Divi theme.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author GalleryCreator

    (@gallerycreator)

    Hello,
    you can try to edit this function pgc_sgb_plugin_frontend_scripts – add your post type.

    Thread Starter nettlraj

    (@nettlraj)

    Hi. Thanks for your swift reply! Yes, I can edit that function and it does work when I do. However I fear it will get overwritten with future updates.

    Any chance you could wrap the relevant line in a filter hook?

    Hi, it would also not hurt to mention that the function pgc_sgb_plugin_frontend_scripts is located under plugins/init.php file on circa row no.22.

    In addition, some may wonder how to find out what post type they are after. You can do so with the ‘Find My Custom Post Types’ plugin or use the built-in WP function called get_post_types().

    Thread Starter nettlraj

    (@nettlraj)

    Thanks @lbakyl that’s exactly where I found it!

    @gallerycreator is it possible you to add a filter so we can add custom post types without editing the plugin directly? It would be most useful and appreciated!

    • This reply was modified 3 years, 8 months ago by nettlraj.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Lightbox for galleries in custom post types?’ is closed to new replies.