Archived topic
Category description after posts
3 replies · Started by Florian on December 7, 2017
Viewing posts 1–4 of 4
Hi,
Is it possible to show the WP category description on the categories after the posts? I want to have longer category descriptions below the fold.

Thanks,
Florian
Hmm, not easily, but do-able.
First, hide the current description:
.page-header .taxonomy-description {
display: none;
}
Then add it in:
add_action( 'generate_after_main_content', 'tu_tax_description_after_content' );
function tu_tax_description_after_content() {
if ( ! is_archive() ) {
return;
}
$term_description = term_description();
if ( ! empty( $term_description ) ) {
printf( '<div class="taxonomy-description">%s</div>', $term_description );
}
}
You'll likely have to style it with some CSS, but that should get you started :)
That works :-) Thanks for your help!
You're welcome :)
This archived topic is closed to new replies.