Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1483882

    Hey there. We are using the masonry grid to pull in projects and restrict the sorting filter. We are selecting a group of categories, however all are being pulled in. If we try the portfolio grid it limits the number of categories in the filter to 6 rather than the 9 active categories, with projects included in each one.

    #1484159

    Hey would be great to get a reply on this

    #1484285

    Hi,

    Sorry for the delay. We are not yet sure what’s causing the issue, but we noticed that you’ve made modifications to the header.php file. What happens if you temporarily disable this template or replace it with the original code from the parent theme’s header.php file?

    Best regards,
    Ismael

    #1484989

    Hi that did not change anything

    #1485002

    Hi,

    The other sorting items are displayed because some portfolio items belong to multiple categories. For example, the item Harrisonburg Innovation Hub is assigned to “Commercial and Retail”, which is a selected category, but it also belongs to three additional categories, Anthony Barone’s Projects, Ben Reid’s Projects, and Kevin Gabel’s Projects.

    Please note that all categories associated with the items will display as sorting options. The “Which Entries Should Be Used” option only controls which items are shown in the masonry element, but it does not control or limit the sorting/filter categories.

    If you need to hide the other categories and only display the selected ones, try adding this css code:

    #top .av-sort-by-term a, #top .av-sort-by-term .text-sep {
        display: none;
    }
    
    #top .av-sort-by-term .commercial-retail_sort_button, #top .av-sort-by-term .education_sort_button, #top .av-sort-by-term .healthcare_sort_button, #top .av-sort-by-term .industrial_sort_button, #top .av-sort-by-term .municipal-civic_sort_button, #top .av-sort-by-term .religious_sort_button {
        display: inline-block;
    }

    Best regards,
    Ismael

    #1485088

    Hi Ismael,

    This method is working, however, it is only pulling in 12 projects and filtering from those 12. We have over 170 projects that should be displayed here. What are the next steps for this?

    Thanks for your continued assistance.

    #1485097

    Hi,

    For additional categories, you will need to manually add the sort category class name selectors (e.g., .commercial-retail_sort_button, .education_sort_button, etc.) to the css we suggested above.

    You can also try adding this filter to the functions.php file to return only parent terms or categories.

    function avf_masonry_term_args_mod( $term_args, $context, $params, $ajax ) {
        // retrieve parent terms only
        $term_args['parent'] = 0;
        return $term_args;
    }
    add_filter( 'avf_masonry_term_args', 'avf_masonry_term_args_mod', 10, 4 );
    

    Let us know the result.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.