0

I can't figure out or find an answer on how to enable the description in the custom taxonomy category pages. Under description field it says: "The description is not prominent by default; however, some themes may show it.".

I've managed to enable it to normal category pages by adding this code to archive.php

<?php echo category_description(); ?>

But it's still disabled on taxonomy pages.

Any help will be appreciated.

Problem solved

I find out that my theme has taxonomy.php where this code

<?php echo term_description(); ?>

needs to be added to make the description visible on custom taxonomy page.

Thanks to @PieterGoosen for helping me out.

2

To display the description from a taxonomy term, you can use echo term_description( $term_id, $taxonomy ); where $term_id is the term ID of the current term and $taxonomy is the taxonomy the term belongs to.

For general use on your taxonomy page, you can just use echo term_description();

  • Thanks. Now I have these two lines added to my theme archive.php <?php echo term_description(); ?> <?php echo category_description(); ?> but it still only works on regular category pages, but not on custom taxonomy page... – Mantas Sep 9 '14 at 21:39
  • Works for me, are you sure your term has a description, are you sure your custom taxonomy uses archive.php. Are you even talking about terms here? – Pieter Goosen Sep 10 '14 at 5:10
  • you are right, my taxonomy isn't using archive.php. It uses taxonomy.php. Thanks! – Mantas Sep 10 '14 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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