Saw your plight on Twitter, thought I might come to the rescue (or at least attempt to).
Here are my two guesses…
Firstly, are you setting has_archive
in your register_post_type
arguments to true
?
Secondly, have you tried calling flush_rewrite_rules()
after your register_post_type
line?
If neither of those suggestions are applicable, I think we’ll need to see what your register_post_type
args look like to provide more assistance.
This is what I have in my function file right now.
http://pastebin.com/t1bf94ZA
I’ll look and see if I can figure out this flush_rewrite_rule()
Yeah, your arguments look fine. I would just insert:
flush_rewrite_rules();
After line 62, right after you register your taxonomy. Then, reload your page (so functions.php
executes) and see if it works.
There must be something else going on somewhere cause it’s still not working…
Arrrgggg…..
I’ve got someone else looking into it though.
Sorry to hear that! Maybe one little argument is off.
One other thing to keep in mind. It’s generally considered poor practice to name custom post types without a theme- or plugin-specific prefix. For example, instead of testimonial
you’d use bluelime_testimonial
and then use the rewrite argument to specify a slug
of testimonial
.
If you happened to try any plugins or something else that may have used a similar post type, you can run into some nasty conflicts.
Now, I doubt that’s what’s happening here, but it’s worth mentioning.
Best of luck!
I hear you Tyler, I usually have my prefix, but the code that you are seeing now has been changed about 5 times since we’ve started this thread. I’m trying some code that a twitter follower provided. I’ll go and fix it once I have this going.
With the help from Tyler and other twitter friends. I managed to get this working. The Custom Post Type code was updated in the functions.php and I create a taxonomy-genre.php template.
Here is the code if anyone wants it.
Code for the CPT – http://pastebin.com/GrcRpCTR
Code used in my taxonmy-genre.php http://pastebin.com/tW7KZUiN
Yes, I hardcoded the h1, tsk, tsk…
Whatever…