Skip Navigation

[Resolved] How to disable duplcate popup (3rd plugin) on toolset slider block

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to disable duplcate popup (3rd plugin) on toolset slider block

Solution:
You will have to target the element to add the "nofancybox" class using the jQuery.

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/how-to-disable-duplcate-popup-3rd-plugin-on-toolset-slider-block/#post-2338597

Relevant Documentation:

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Rostislav Avtodiychuk 2 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2336783

Tell us what you are trying to do? I create CPT for slider image. hidden link I Install 3rd plugin Easy FancyBox for popup image in standart wp gallery in posts/pages.
But i have problem with duplicate image popup, in first popup generate from plugin, and i need disabled it, I need only popup from toolset block slider. I can't delete 3rd plugin, i need them for other gallery on site. In Support page i found same solution for next-gen gallery https://wordpress.org/support/topic/double-window-when-using-nextgen-pro/ but i don't understand what class i need to insert in code.
Can you help to disabled first popup from Easy FancyBox?
Thank you for help!

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2336873

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to dequeue the JS file you do not want to load on the page/post using the hook: wp_enqueue_scripts

For example:

add_action( 'wp_enqueue_scripts', function() {

global $post;

If(is_post_type_archive('surplus-of-medical-s')){
    wp_dequeue_style( 'fancybox-css' ); 
    wp_dequeue_script( 'jquery-fancybox-js' );
}
   
}, 9999 );

Can you please try to add the above code to your theme's functions.php file or "Custom Code" section offered by Toolset:
=> https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/

#2337011

Thank you for answer Minesh
I'll try to add to functions.php - not work
I'll try add to Custom Code - not work
If you have any idea it will be very good. Any way i try to ask this question to plugin developer.
Thank you.

#2337025

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check with them if they have any hook to not load the easy fancybox assets on specific page.

If they do not have way I will require admin access details to your site.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2337445

Minesh, can you take into account in the code how to disable the easy funcybox popup on other CPTs. I still have this problem on this archive hidden link
Thank you!

#2338597

I contacted the plugin developer for support and they advised me such a solution, it is not as elegant as yours, but it solved the problem. I will write this proposed code here, maybe it will be useful to someone in the future.
Thanks Minesh for the help.

<script type="text/javascript">
jQuery(document).on('ready', function(){
  jQuery('a[data-lightbox]').addClass('nofancybox');
});
</script>