How to Customize and Control Your Category & Tag Descriptions in Blocksy
Content
Many WordPress users want more control over how and where their category and tag descriptions appear. Whether you want to move a long description below your posts, add a count to the title, or simply change the formatting, this guide covers the most common methods.
Why This Happens
By default, WordPress displays taxonomy (category/tag) descriptions at the top of archive pages. The theme follows this standard behavior. Customizing this output, such as changing its position or adding dynamic data, typically requires going beyond the basic theme settings.
Common Solutions
1. Repositioning the Description (Using Blocksy Pro)
If you find a long category description looks awkward at the top of the page, you can move it below the list of posts. The most straightforward way to achieve this is by using the Content Blocks feature available in Blocksy Pro.
- Create a new Content Block and select the "After Main Content" hook location.
- Use the
get_term_field()function to dynamically pull in the description for the specific category or tag being viewed. - You would need to create a separate Content Block for each taxonomy you wish to customize this way.
2. Adding a Post Count to the Archive Title
To display the number of posts in a category within the archive title (e.g., "Category Name (15)"), you can add a small code snippet to your child theme's functions.php file. A common snippet found in support forums is:
function custom_add_count_on_archive_title( $title ) {
$term = get_queried_object();
if( $term instanceof WP_Term && 'category' === $term->taxonomy ) {
$title .= ' (' . $term->count . ')';
}
return $title;
}
add_filter( 'get_the_archive_title', 'custom_add_count_on_archive_title', 10, 1 );
Important: Pay close attention to the priority (the number 10) in the add_filter function. Using the wrong priority is a common reason this code might not work as expected.
3. Translating or Changing Text Strings
To change static text like "Category" or "Written by" based on the language of the content, you will need a translation plugin. The Loco Translate plugin is a popular and powerful tool for this.
- Install and activate Loco Translate.
- Use it to find and translate strings from either the WordPress core or the Blocksy theme, depending on where the text originates.
- This method allows you to change "Category" to "Category:" or "Categoría:" without editing theme files directly.
Conclusion
While the default WordPress and Blocksy setup provides a solid foundation, achieving a highly customized layout for your taxonomy pages often requires additional steps. Using Blocksy Pro's Content Blocks for complex layout changes, carefully adding custom code for dynamic data, or employing a translation plugin for string changes are the most effective paths to getting the look and functionality you want.
Related Support Threads Support
-
Tag cloud shows all tagshttps://wordpress.org/support/topic/tag-cloud-shows-all-tags/
-
Rename blog posts page text itemshttps://wordpress.org/support/topic/rename-blog-posts-text-page/
-
How to Put tags and categories in internal search ?https://wordpress.org/support/topic/how-to-put-tags-and-categories-in-internal-search/
-
Visually modify tags and categories in posthttps://wordpress.org/support/topic/visually-modify-tags-and-categories-in-post/
-
extracthttps://wordpress.org/support/topic/extract-2/
-
Taxonomy Extra Text like Bottom Text Field Like taxonomy Descriptionhttps://wordpress.org/support/topic/taxonomy-extra-text-like-bottom-text-field-like-taxonomy-description/
-
Read more in categoryhttps://wordpress.org/support/topic/read-more-in-category/
-
Categories/ tagshttps://wordpress.org/support/topic/categories-tags-4/
-
Add text within post titlehttps://wordpress.org/support/topic/add-text-within-post-title/
-
Trending today (posts)https://wordpress.org/support/topic/trending-today-posts/
-
Change post background colourshttps://wordpress.org/support/topic/change-post-background-colours/
-
Adding category counthttps://wordpress.org/support/topic/adding-category-count-3/
-
Changing author label per categoryhttps://wordpress.org/support/topic/changing-author-label-per-category/
-
Archive title additionhttps://wordpress.org/support/topic/archive-title-addition/
-
Category description – how to move it bottom?https://wordpress.org/support/topic/category-description-how-to-move-it-bottom/
-
Category Descriptionhttps://wordpress.org/support/topic/category-description-39/
-
Image captionhttps://wordpress.org/support/topic/image-caption-24/
-
Last Updated datehttps://wordpress.org/support/topic/last-updated-date-3/