As suggested in thread: https://kriesi.at/support/topic/exclude-child-categories-from-masonary-layout/ I have tried to add this code to my child theme
add_filter( 'avia_masonry_entries_query', 'avia_masonry_entries_query_mod', 10, 2);
function avia_masonry_entries_query_mod( $query, $params ) {
$query['$tax_query'] = array(
'taxonomy' => $params['taxonomy'],
'field' => 'id',
'terms' => $terms,
'include_children' => false,
'operator' => 'IN'
);
return $query;
}
If we can’t get it to work through an edit in the child themes func†ions, could you then help me with the css code to remove it? I have thought that it could be a possibility to have a css code like this, but I can’t seem to get it right
#no-date-no-children .category-bangladesh .category-senegal .category-india {
display: none;
}
Hi!
Thank you for using Enfold.
If you want to use css code to remove the unwanted posts. Please use this one.
.av-masonry .category-bangladesh, .av-masonry .category-india, .av-masonry .category-senegal {
display: none !important;
}
Best regards,
Ismael
I needed to only remove the child categories for the masonry in a specific ID – so I ended up with this solution
#no-date-no-children .av-masonry .category-bangladesh, .av-masonry .category-india, .av-masonry .category-senegal {
display: none !important;
}
Thanks – and this ticket can be closed.
Hi,
I’m glad this was corrected. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon