-
AuthorPosts
-
September 5, 2018 at 12:41 pm #1006089
I tried to follow all the instructions on this thread: https://kriesi.at/support/topic/remove-all-category-on-portfolio-filter/
But all it does it remove the All tab. Not the category completely. When people scroll down to the portfolio I would like them to see the book cover tab first.
You can see it here on my website: http://letsgetbooked.com/book-cover-marketing-design/
I can give access to a mod if they could help me/ fix it for me?
Here is the CSS I used:
a.all_sort_button.active_sort, a.all_sort_button.active_sort + span {
display: none;
}a.all_sort_button {
display: none !important;
}September 5, 2018 at 1:03 pm #1006097Hey Amandah86,
Please try to add this code to the child theme functions.php:
add_action('wp_footer', 'ava_auto_click'); function ava_auto_click(){ ?> <script> jQuery(window).load(function() { setTimeout(function(){ jQuery('.page-id-3399 .book-cover-designs_sort_button').trigger('click'); }, 500); }); </script> <?php }
It will trigger a click on the filter “Book Cover Designs” after the page loaded. You can replace 500 with a lower or higher value (if you want to delay the effect).
Best regards,
DudeSeptember 5, 2018 at 6:28 pm #1006258It didn’t work
I got this message:
Your PHP code changes were rolled back due to an error on line 2498 of file wp-content/themes/enfold/functions-enfold.php. Please fix and try saving again.
Cannot redeclare ava_auto_click() (previously declared in wp-content/themes/enfold/functions.php:720)
September 5, 2018 at 7:50 pm #1006288Hi Amandah86,
Try renaming the function you’re adding like ava_custom_auto_click()
add_action('wp_footer', 'ava_custom_auto_click'); function ava_custom_auto_click(){ ?> <script> jQuery(window).load(function() { setTimeout(function(){ jQuery('.page-id-3399 .book-cover-designs_sort_button').trigger('click'); }, 500); }); </script> <?php }
Best regards,
VictoriaSeptember 6, 2018 at 11:19 am #1006543That worked. Thanks so much!!
September 6, 2018 at 12:45 pm #1006559Hey!
Great, you can delete the old “ava_auto_click” function (probably you copied it from this thread: https://kriesi.at/support/topic/remove-all-category-on-portfolio-filter/ ) – it’s not required.
Best regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.