My question is about the Post Grid plugin, which we really like.
I have updated my version to the newest version (can't recall the previous version). In the previous version, all grid items received a class based on their category. For instance, an item belonging to category windows would have a windows CSS class.
How can I add these tags again to the items? We have logic that is written around the concept that we can derive the category form an item.
Thanks in advance.
Welcome to our forum.
I guess you are using free version, by default we no longer need to display category in item class, thats why we removed it to make more less html or reduce size, but there is filter hook available to override item classes, please see the documentation.
https://pickplugins.com/documentation/post-grid/filter-hooks/post_grid_item_classes/
Hope you understand.
Regards
Thanks :-). I got it working by adding the following code to the functions.php file:
add_filter('post_grid_item_classes', 'post_grid_item_classes_custom');
function post_grid_item_classes_custom($classes
$classes['custom'] = get_the_category()[0]->slug;
return $classes;
}