-
AuthorPosts
-
March 3, 2023 at 1:06 pm #1399988
I would like my portfolio grid to only show the entries when I click on the category?
March 4, 2023 at 10:07 pm #1400127Hey michael_wunderbar,
If I understood correctly the following script will hide the portfolio grid container on page load and only show the portfolio sort container, when any of the categories in the sort container are clicked they will show, when the “All” category is clicked they all will hide again.
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function custom_script() { ?> <script> (function($) { if ($('.avia-fullwidth-portfolio #js_sort_items .all_sort_button.active_sort')){ $('.avia-fullwidth-portfolio .grid-sort-container ').css({'display':'none'}); }else{} $("#js_sort_items a:not(.all_sort_button)").click(function() { $('.avia-fullwidth-portfolio .grid-sort-container ').css({'display':'block'}); }); $("#js_sort_items a.all_sort_button").click(function() { $('.avia-fullwidth-portfolio .grid-sort-container ').css({'display':'none'}); }); }(jQuery)); </script> <?php } add_action('wp_footer', 'custom_script');If you have any trouble with this please include an admin login in the Private Content area so we can be of more assistance.
Best regards,
MikeApril 2, 2023 at 1:25 pm #1403276This reply has been marked as private.April 2, 2023 at 2:26 pm #1403283Hi,
Thank you for the link to your site, I found that you had jQuery loading in your footer via the theme settings so I adjusted the script and now it is working, please clear your browser cache and check.Best regards,
MikeApril 2, 2023 at 2:34 pm #1403286Thine, Thank you
April 2, 2023 at 3:13 pm #1403292Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘portfolio grid’ is closed to new replies.
