This members-only tutorial provides the steps to automatically add each post's category (or any taxonomy's terms) slugs to each card's article opening tag when using WP Grid Builder.
Note: This is for the case when the grid uses WP Grid Builder's cards, not Oxygen's Easy Posts/Repeater or a custom non-WPGB grid.