How can I display the category description below the category name by modifying the theme functions.php with a filter?


1 Answer 1


A lot of themes have this built-in so first try adding a category descriptions and see if that solves it. The next way to look at handling this is by modifying the taxonomy archive template by simply adding this below the title in the template: ', '' ); ?>

But your question says specifically to add it by modifying functions.php. I haven't tested this but this looks like it work (from: https://generatepress.com/forums/topic/adding-category-description-to-custom-post-type-archive/):

add_action( 'generate_after_archive_title', function() { if ( is_post_type_archive( 'video' ) ) { the_archive_description( '', '' ); } } );

It's set to only apply to a custom post type of 'video' but you should be able to modify it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.