Jump to content
Sign in to follow this  

How to create a custom taxonomy page?

Recommended Posts


Hi, I've created a custom taxonomy for the location (http://codex.wordpress.org/Taxonomies), added this code to functions.php:

	function locatie_init() {
		// create a new taxonomy
				'label' => __( 'Locatie' ),
				'hierarchical' => true,
				'rewrite' => array( 'slug' => 'locatie' ),
	add_action( 'init', 'locatie_init' );
So far so good. I have added the locations to my posts and I was able to output them with this code in the loop:
	<?php echo get_the_term_list( $post->ID, 'locatie', 'Locatie: ', ', ', '' ); ?>

See the locations under the excerpt: http://www.pepperbase.com/ideeen My question is how I can create a custom taxonomy page. Now I get a 404 error. In this post http://sixrevisions.com/wordpress/taxonomy/ I've read that I should create a custom template called taxonomy-'the custom taxonomy'.php, as wordpress looks for it when it comes to taxonomies. Pagelines works a little different I understand, so any help would be greatly appreciated. I already installed the base theme. I created a custom page called page.locatie.php and a custom section called locatie which I selected in the drag and drop section. I created a page where I selected this custom template for. No luck so far, and I am not sure whether this is the right way to do it in pagelines framework. Thank you!

Share this post

Link to post
Share on other sites
Oops. I was almost there. Just had to flush the permalink structure! No 404 anymore. See the end of [url]http://codex.wordpress.org/Taxonomies[/url] Hence, there is no need for a custom taxonomy page.

Share this post

Link to post
Share on other sites
Did you get this resolved then?

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this