Support » Developing with WordPress » Custom taxonomy label

  • Resolved valery2016


    Hi all!
    There is a problem with understanding how to correctly display a list of custom categories on archive pages.

    Initial data.
    1. Created custom material type “mywork” and custom taxonomy “work-category”.
    2. Created single-mywork.php and archive-mywork.php templates
    3. Now, to display the categories associated with each material, the following is written in the loop
    <? php the_taxonomies( '' );? >

    This gives the following result:
    My work category: category#1

    Trying to change ‘template’ does not work. Because in get_the_taxonomies() function there is a check with the substitution of the label

    if ( empty( $t['label'] ) ) {
      $t['label'] = $taxonomy;

    How to remove “My work category” from output?


    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.