Adding more information to a Content Product Category

Your problem is not Woocommerce specific, and can be generalised as:

Given a term in a taxonomy, how do I attach a chunk of text to that term and display it in the term listings?

In this case, the taxonomy is the one provided by Woocommerce.

To do this you need to first get the current term being queried:

global $wp_query;
$term = $wp_query->queried_object;

Then you need to display some text. I suggest you use the term description:

A screenshot of the term description field in the WordPress admin area

You would then display this description using the $term variable we grabbed earlier:

echo $term->description;

You may even wish to run the_content filter on it so that you can use shortcodes etc:

$description = apply_filter( 'the_content', $term->description );
echo $description;

Things to be wary of:

  • The queried object may not be a term, it may be a date or a post, if that’s the case, the above code will fail, so only put this on taxonomy archive templates, not general
  • The description field is not a WYSIWYG visual editor. This does not prevent you using it this way, and you could turn it into one, but that is beyond the scope of this question.