• I’m trying to call a Taxonomy from a template i have created. The issue is there are many taxonomies all linked to existing pages. I need to display the description of the taxonomy depending on which page is viewed.

    I can make this work if I specifically name the taxonomy, but I need it to work based on a variable. Can anyone help?

    The code i’m trying to use:

    <?php
    $customepattributes = get_the_terms( $product->id, $taxonomy);
          foreach ( $customepattributes as $customepattributes ) {
              echo "<b>".$customepattributes->name."</b>";
              echo $customepattributes->description;
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Call a Taxonomy as a variable’ is closed to new replies.