Ukavi Ukavi - 1 year ago 91
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 Source

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(); ?>
  <?php the_conetent(); ?>
<?php endwhile; ?>
<?php endif; ?>

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

For Detailed Information Check this:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download