Hello @dswebnew ,
We’re so sorry for the inconvenience caused to you.
To display taxonomy (category) on the Post Grid block. For that, you need to use the following filter in your fucntions.php file of the child theme.
function single_post_title_before( $post_id, $attributes ) {
if( 'my-post-grid-class' == $attributes['className'] ){
$term_obj_list = get_the_terms( $post_id, 'category' );
// Get the id of category
$category_id = get_cat_ID( 'cat-1' );
// Get the URL of this category
$category_link = get_category_link( $category_id );
$link = '<a href="' .$category_link .'">' .$term_obj_list[0]->name.'</a>';
echo $link;
}
}
add_action( 'uagb_single_post_before_title_grid', 'single_post_title_before', 10, 2 );
To apply different filters for a specific block you need to add a unique class to the block from the Advanced Tab of Post Grid Block.
Please refer to this screenshot.
I hope this helps. Let me know.
Regards,
Sweta