Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks everyone for your help. I modified this slightly so I could output a list of my taxonomies along with the corresponding slug that was created in the admin panel.

    <?php
    $taxonomy = 'event_type';
    $queried_term = get_term_by( 'slug', get_query_var($taxonomy) );
    $terms = get_terms($taxonomy);
    if ($terms) {
      foreach($terms as $term) {
        echo '<li><a href="' . $term->slug . '">' . $term->name .'</a></li>';
      }
    }
    ?>

    In my case, my custom taxonomy is ‘event_type.’ This code outputs a list of links of the the event types I created, with the anchor set as the slug defined in the admin panel. All you need to do to modify this is replace ‘event-type’ with the name of your custom taxonomy.

    Forum: Plugins
    In reply to: Custom Post Type Parent

    @timstl thanks for the post. Maybe not a perfect fix, but exactly what I needed and works great.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)