
Tagged: masonry
-
AuthorPosts
-
May 8, 2025 at 5:33 pm #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.
-
This topic was modified 3 weeks, 6 days ago by
jamescarterweb.
May 13, 2025 at 4:38 pm #1484159Hey would be great to get a reply on this
May 15, 2025 at 8:18 am #1484285Hi,
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,
IsmaelJune 2, 2025 at 7:58 pm #1484989Hi that did not change anything
June 3, 2025 at 7:36 am #1485002Hi,
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,
IsmaelJune 4, 2025 at 10:23 pm #1485088Hi 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.
June 5, 2025 at 5:15 am #1485097Hi,
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 -
This topic was modified 3 weeks, 6 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.