Archived topic
Remove Duplicate Category Link On Category, Archive, Author, and Single Posts
3 replies · Started by Michelle on January 10, 2021
I am using a category link in my meta (CSS).
Problem is, by default there is a category link beneath excerpts on category, archive, and author pages; and also in the post navigation of my single post pages. I want to remove the category link beneath the excerpts and at the bottom on my single post pages.
Unchecking "Show categories" removes the category link beneath the excepts, BUT ALSO IN THE META.
How can I get rid of the extra category links?
Hi,
You can try adding this PHP snippet:
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'author',
'date',
'categories',
);
} );
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
return array(
'post-navigation',
);
} );
Here's how to add PHP snippets to your site:
https://docs.generatepress.com/article/adding-php/
Thank you.
Thank you.
No problem. Glad to be of any help. :D