-
AuthorPosts
-
July 6, 2020 at 3:53 pm #1228313
Hello.
I’m using the “Portfolio Filter Gallery Premium” Plugin on one site, but now the lightbox opens 2 times. I think one by enfold and one by the gallery plugin.
I can disable the lightbox from the gallery plugin, but then also the enfold lightbox doesn’t work on the gallery-page.
I also don’t want to disable the enfold lightbox, ’cause I need it on other pages.How can I solve this problem?
Thank you very much!
July 7, 2020 at 12:39 am #1228419Hey mario_md,
Enfold theme options –> No Lightbox Modal Window
Best regards,
Jordan ShannonJuly 7, 2020 at 7:51 am #1228485Thank you Jordan,
but than the enfold lightbox is disabled on the whole site – I only want to disable the lightbox on the gallery site.
July 7, 2020 at 7:52 am #1228488Thank you Jordan,
but then the enfold lightbox is disabled on the whole site – I only want to disable the lightbox on the gallery site.
July 7, 2020 at 8:30 am #1228497Can you test please if it is enough if you exclude that page from loading the script by this in your child-theme functions.php
Change Page ID to your needsadd_action( 'wp_enqueue_scripts', 'conditionaly_deactivate_lightbox_script', '100' ); function conditionaly_deactivate_lightbox_script() { if(is_page(38198)){ wp_deregister_script( 'avia-lightbox-activation' ); } }
so on Enfold on a masonry the link will be present but no lightbox is opend. Maybe your script will then take over that function.
July 7, 2020 at 2:54 pm #1228612Thank you Guenni007!
I first had to activate the child theme, because I didn’t had one.
I have to chance
if(is_page(38198)){
to
if(is_page(pagename)){
Now it works!
Maybe I can disable the lightbox of the gallery plugin by this way to use the enfold lightbox on the whole side?
July 7, 2020 at 5:57 pm #1228638Hi mario_md,
Glad you got it working for you! :)
I am not sure it’s a good idea to disable that plugins lightbox, it might not work with Enfold’s lightbox as expected.
If you need further assistance please let us know.
Best regards,
VictoriaJuly 16, 2020 at 8:11 am #1230852nice – but if you use the pagename – you had to put it in quotationmarks i guess:
if(is_page('pagename')){
the page id you can find on the body#top container – it has the class page-id-ID on my case above page-id-38198 etc.July 16, 2020 at 8:27 am #1230856Thanks Guenni007!
I’ve changed it to page-id!But it for me it also works only with the pagename, without quotationmarks ;)
I think it’s solved – Admins close this ;)
July 16, 2020 at 3:46 pm #1230947Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Lightbox open 2 times with "Portfolio Filter Gallery Premium" Plugin’ is closed to new replies.