Home page for a category / taxonomy

The /location page doesn’t exist because WordPress doesn’t just make a page based off your URL structure.
You can create a “Page” called “location” if you need to show content there.

and if you want to list the available terms you have in the location taxonomy you can create a custom page template ex:

<?php
/**
 * Template Name: Locations archive
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */

get_header(); ?>

    <div id="primary">
        <div id="content" role="main">

            <?php while ( have_posts() ) : the_post(); ?>
                <?php get_template_part( 'content', 'page' ); ?>
            <?php endwhile; // end of the loop. 
            $taxonomy = 'locations';
            $terms = get_terms($taxonomy,array(
                'orderby'       => 'name', 
                'order'         => 'ASC',
                'hide_empty'    => true    
            ));

            if ( count($terms) > 0 ){
                echo "<ul>";
                foreach ( $terms as $term ) {
                    echo '<li><a href="'.get_term_link($term->slug, $taxonomy).'">'.$term->name.'</a></li>';
                    //do other stuff for each term
                }
                echo "</ul>";
            }
            ?>

        </div><!-- #content -->
    </div><!-- #primary -->

<?php get_footer(); ?>

This will list all terms in locations taxonomy with links to each term’s archive.

Leave a Comment