Hi,
I was following this guide https://generatepress.com/forums/topic/display-categories-on-the-top-of-the-blogpost/ but not working for me.
Tried below code:
add_action( ‘generate_after_entry_title’, function() {
$cat = get_the_category();
if ( isset( $cat[0]->parent ) ) {
var_dump($cat[0]->parent);
echo ‘
‘ . get_cat_name($cat[0]->parent) . ‘
‘;
}
} );
So is there any way to display categories on the top of the blogpost besides author name?