Ukavi Ukavi - 5 months ago 23
PHP Question

Wordpress Page for custom taxonomy

I'm a newbie in WordPress and I've just created a new custom-taxonomy called categories under a custom post type called arts. Is there a way I can create a custom page to display the 'categories's custom type? Such that a user can navigate to arts/categories and see all the terms under the categories taxonomy.

Answer

Create a file in your theme folder named taxonomy-categories.php and include your loop inside it...

Sample loop here:

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
  <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </a></h2>
  <?php the_conetent(); ?>
</div>
<?php endwhile; ?>
<?php endif; ?>

This loop will display all your posts assigned to custom taxonomy named "categories"

For Detailed Information Check this: http://codex.wordpress.org/Template_Hierarchy