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
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
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
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.
My issue is resolved now. Thank you!