Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1399988

    I would like my portfolio grid to only show the entries when I click on the category?

    #1400127

    Hey 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,
    Mike

    #1403276
    This reply has been marked as private.
    #1403283

    Hi,
    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,
    Mike

    #1403286

    Thine, Thank you

    #1403292

    Hi,
    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘portfolio grid’ is closed to new replies.