Skip to content

Snippet: Move Category Description under Pagination

You can now also create your own custom template for your categories and tags so you can design it however you want. Learn more →

By default in the Total theme the category/archive descriptions are added as subtitles under the main title but there are theme options which allow you to move it into the main content area above the loop. Now if you want to move the category description so it's below your posts/pagination it's very easy. Here is the code you would use to move it.

// First remove from subtitle
add_filter( 'totaltheme/page/header/has_subheading', function( $check ) {
	if ( is_category() || is_tag() ) {
		$check = false;
	}
	return $check;
} );

// Add category description under the loop
add_action( 'wpex_hook_content_bottom', function() {
	if ( is_category() || is_tag() ) {
		get_template_part( 'partials/term-description' );
	}
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top