I'm in a pickle and unfortunately, have almost zero working understanding of mod_rewrite/apache stuff. Here's what's going on:
I've got a hierarchal custom post type with parents and children. On my test server, before I can see any of the custom posts, i needed to go to the permalinks settings page and hit refresh. Then I can see parents. When I hit it again, I can see children, and I'm golden.
On the actual server (my friend's shared hosting account) -- I follow the same process and the parent's come through -- but not the children. I know it's not a plugin issue, because it's true with them all turned off, and also on the test server with them all turned on.
The child posts DO come through when i have the settings at default permalinks -- so I know the posts are actually getting created. I'm thinking it has to be something on the shared server -- any ideas what to look for? It's so weird that parent's work but children don't...
Thanks!
martin
--Since it's working on the test server, I'm pretty sure my code is right -- but just in case, this is how i'm registering them:
register_post_type('book', array(
'label' => __('Books'),
'singular_label' => __('Book'),
'public' => true,
'show_ui' => true,
'_builtin' => false, // It's a custom post type, not built in!
'_edit_link' => 'post.php?post=%d',
'capability_type' => 'post',
'hierarchical' => true,
'rewrite' => array("slug" => "book"), // Permalinks format
'query_var' => false,
'supports' => array('title', 'editor', 'comments','thumbnail','page-attributes')
));
add_action( 'init', 'create_book_taxonomies', 0 );
function create_book_taxonomies() {
register_taxonomy( 'format', 'book', array( 'hierarchical' => true, 'label' =>
__('Formats', 'series'), 'query_var' => 'format' ) );
}
-cheers, mc.