WPBakery Portfolio Filter
Question
I’ve tried everything I can think of so figured I would reach out to see if anyone here has any ideas. I have a WPBakery Post Grid with filters and I want to be able to send people to the respective category with a link.
The options are named data-vc-grid-filter-value=".vc_grid-term-11"
and I’ve included the below in the custom JS section
jQuery(document).ready(function($) {
var hash = window.location.hash.substr(1);
if(hash){
jQuery('[data-vc-grid-filter-value=".'+hash+'"]').trigger('click');
}});
So it should work with the URL mysite.com/#vc_grid-term-11
and it loads on the initial page load but then it reloads it with everything selected.
0
2 years
2020-12-16T11:10:21-05:00
2020-12-16T11:10:21-05:00 0 Answers
5 views
0
Leave an answer