Skip Navigation

[Resolved] Conditional block set to pagination

This support ticket is created 2 years, 10 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 16 replies, has 3 voices.

Last updated by Pete 2 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#2099941

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Pete,

What Minesh has said is not false. It is just difficult in this case because all the elements have generic classes(from Kadence, Toolset, and Gutenberg). What I suggested is the most straightforward method, you add a class or an ID to the element that you want to target, and voila!

I inspected the page, as Minesh said, and I was able to come up with the following selector ".inner-column-1 .hide-mob-map"
The code, then, is:

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
    jQuery('html, body').animate({ scrollTop: (jQuery(".js-wpv-view-layout").offset().top) - 220 }, 'slow');
 
    var x = jQuery(".js-wpv-view-layout").data('pagination');
    var selector = '.inner-column-1 .hide-mob-map';
    if(x.page > 1){
        jQuery( selector ).hide()
     }else{
         jQuery( selector ).show();
     }
});
#2100039

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.