Skip Navigation

[Resolved] Filter option not working after first "filtering"

This support ticket is created 5 years, 1 month 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: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by kerimF 5 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1401995

Hi there,

I would like to get your help. My views aren't working properly. I'm very happy with the support Waqar gave me, and since he's the one that guided me with this problem initially, I would like to be helped by him.

So basically the problem is that the views aren't working after one filter is applied, or after the pagination buttons are clicked.

Also, I wanted to disable the continues URL update that took place after a filter/pagination button was clicked. Waqar advised me to activate the button: "Do not adjust URLs after loading search results". After that, the URL still got updated(tried it with multiple views, on all of them it didn't work). I didn't respond to the previous ticket, out of lack of time. Sorry about that! But the problem is still here.

Can you help me fix the filtering/pagination option, and the problem I'm facing with the URL that keeps on updating? Both problems can be seen on the view that is located here: hidden link.

Greetings,

Kerim

#1402433

Hi Kerim,

Thanks for asking! I'd be happy to help.

In the view that you mentioned, I noticed there is a script error showing in the browser's console.
( screenshot: hidden link )

This error is originating from the custom JS code added in that view.
( screenshot: hidden link )

To fix this, you can replace all instances of "$" with "jQuery".
( ref: hidden link )


jQuery( document ).ready( function( jQuery ) {
    viewClickFunction();
});
 
function viewClickFunction() {
    jQuery(".postborder").click(function( ) {
        window.location = jQuery(this).attr("data-url"); 
        return false;
    });
}
 jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
    viewClickFunction();
});

As for the view's URL, the "Do not adjust URLs after loading search results" option is for search filters.

For the paginated results, you'll find the option "Update the URL of the page when paginating the View", under the "Pagination and Sliders Settings" section.
( screenshot: hidden link )

I hope this helps.

regards,
Waqar

#1402451

Aah thank you very much! This solution helps. It works now :D.

Although, for some reason one of my views isn't clickable, and I'm not seeing what is going wrong here. It's the view on hidden link, called trainer-zoeken-nieuw. Could you tell me what is going wrong here and how I can fix this??

Thanks!

Greetings,

Kerim

#1402911

Hi Kerim,

Thanks for the update and glad that it works.

The view "trainer-zoeken-nieuw" needs the same changes in the custom JS script added in it.

Screenshot: hidden link

When the script error will be fixed, the other script to take visitors to single post pages on click will work as expected.

#1402921

My issue is resolved now. Thank you!