Hello Support,
On the Catalogs page I have hidden the “ALL” tab so we can only see “Contemporary Catalog” and “Traditional Catalog”.
How can we make it work so that when a user clicks on the Catalogs page, the “Contemorary Catalog” Tab is already active for the user instead of the “All” which is hidden in the front end.
Hope to hear from you soon.
Thanks.
KP
Hi,
You can trigger a click on the contemporary catalog sort option, try adding this at the very end of your theme / child theme functions.php file:
function add_custom_script(){
?>
<script>
(function($){
$(window).load(function() {
$('.contemporary-catalog_sort_button').trigger('click');
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Regards,
Josue
Thanks for your help that worked perfectly.
One more question in the Portfolio page we have a catergory called VIDEO. Is there a way to make when a user clicks on “VIDEO” if it can be linked to an external URL example http://www.youtube.com.
Please let me know if thats possible.
Thanks,
MP
Hi!
In the previous code, add:
(function($){
$(window).load(function() {
$('.contemporary-catalog_sort_button').trigger('click');
$('.video_sort_button').on('click', function(){
location.href = "http://youtube.com";
});
});
})(jQuery);
Cheers!
Josue