Showing current taxonomy terms

try this:

<?php get_header(); ?>
<? // get the current term
    $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );

    <div class="container" role="main">
        <h1 class="entry-title"><?php echo $term->name; ?></h1>
    <div class="entry-content ref">
    <?php

    $loop = new WP_Query( array( 'post_type' => 'references' , 'genre' => $term->slug) ); ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>

        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

                <h2 class="entry-title"><?php the_title(); ?></h2>

                <div class="ref"><?php the_content(); ?></div>

        </div><!-- #post-## -->

        <?php the_post_thumbnail();?>

    <?php endwhile; // end of the loop. ?>

</div><!-- .entry-content -->


        </div><!-- #container -->

<?php get_footer(); ?>

And you should put this in your theme inside taxonomy-genre.php

Leave a Comment