Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have set up a CPT, lets say "Movies".

...

'rewrite'   => array( 'slug'=>'movies', 'with_front'=>FALSE )

...

I added a taxonomy "Genre".

...

'rewrite'   => array( 'slug'=>'movies/genre', 'with_front'=>FALSE )

i although tried

'rewrite'   => array( 'slug'=>'genre', 'with_front'=>TRUE )

...

register_taxonomy( 'category_movie', 'movie', $args );

...

Everything works but... when i want to browse some movies e.g. in the category/taxonomy horror it does not work.

I assumed the file taxonomy-category_movie.php anf if not then taxonomy.php

OR

category.php

OR

tag.php

BUT NO! WP always falls back to the index.php file.

So i though i will check what WP actually is doing and added

if ( is_home() )
{
echo "<br>IS HOME";
}

if ( is_single() )
{
 echo "<br>IS SINGLE";
}

if ( is_singular() )
{
 echo "<br>IS SINGULAR";
}

if ( is_front_page() )
{
 echo "<br>IS FRONT PAGE";
}

if ( is_page() )
{
 echo "<br>IS PAGE";
}

if ( is_category() )
{
 echo "<br>IS CATEGORY";
}

if ( is_tag() )
{
 echo "<br>IS TAG";
}

if ( is_tax() )
{
 echo "<br>IS TAX";
}

but none of the messages made it into the browser....

Hopefully somebody knows the answer!!

share|improve this question
add comment

1 Answer

There's a giant diagram on the wordpress documentation showing how it chooses which file to display/load, as you can see here:

http://codex.wordpress.org/images/1/18/Template_Hierarchy.png

alt text

If this doesn't help, my other suggestion is trying with the '_' removed from the taxonomy name, and to test with the rewrite option removed from your custom post type declaration. In my experience wordpress is fidgetty about type names that add punctuation so I try to keep to a singular word or Camel case. You may have more success with a "genre" taxonomy

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.