Archived topic
Show Category link in the Tag and Author Archive only?
1 reply · Started by nomadiceman on August 6, 2021
Is there a way I can display the category link in the Tag and Author Archive only? I don't need it in the category archives
Hi there,
you can use the generate_footer_entry_meta_items filter to conditionally change what is displayed in the footer meta:
https://docs.generatepress.com/article/generate_footer_entry_meta_items/
For example - this will just return the date, author and comments link in category archives.
add_filter('generate_footer_entry_meta_items', function($items){
if( is_category() ){ //if its category archive
return array(
'date',
'author',
'comments-link',
);
}
return $items;
});
This article explains adding PHP: https://docs.generatepress.com/article/adding-php/