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.

Basically everything works fine except for the top level pages ( e.g. category, archives, single post, custom post type, etc...).

I have 3 custom post types and 4 custom taxonomies (each custom taxonomy is attached to a post type respectively and there is one more taxonomy that is attached to all of the post types). Here is the set up for both of them:

register_taxonomy(
    'newsroom-topics',
    array ( 0 => 'news-post',),
    array (
        'hierarchical' => true, 
        'label' => 'Newsroom Topics',
        'show_ui' => true,
        'query_var' => true,
        'rewrite' => array('slug' => '/'),
        'singular_label' => 'Newsroom Topic'
    ) 
 );

register_post_type(
    'news-post',
    array(  
        'label' => 'Newsroom Posts',
        'description' => '',
        'public' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'rewrite' => array('slug' => 'newsroom'),
        'query_var' => true,
        'has_archive' => true,
        'exclude_from_search' => false,
        'menu_position' => 5,
        'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes','post-formats',),
        'taxonomies' => array('content-type','newsroom-topics',),
              'labels' => array (
              'name' => 'Newsroom Posts',
              'singular_name' => 'Newsroom Post',
              'menu_name' => 'Newsroom Posts',
              'add_new' => 'Add Newsroom Post',
              'add_new_item' => 'Add New Newsroom Post',
              'edit' => 'Edit',
              'edit_item' => 'Edit Newsroom Post',
              'new_item' => 'New Newsroom Post',
              'view' => 'View Newsroom Post',
              'view_item' => 'View Newsroom Post',
              'search_items' => 'Search Newsroom Posts',
              'not_found' => 'No Newsroom Posts Found',
              'not_found_in_trash' => 'No Newsroom Posts Found in Trash',
              'parent' => 'Parent Newsroom Post',
),) );

Any thoughts as to why this is happening?

UPDATE:

So after having just post this after a while of looking for why this was happening, i found out the problem. In the reading settings, my front page was set to be displayed as a static page, and when i changed it back to the default, everything worked fine.

share|improve this question

1 Answer 1

If you register new custom post types and get weird 404s, you just need to change your permalink settings. This happens to me pretty much every time. You can change the, right back to where they were before. It's just the act of changing them that does the trick.

share|improve this answer
    
Ya, I'm aware of that problem. My problem was coming from the fact that I was rewriting my taxonomy out of the url which then causes wordpress to not know what type of page it is looking at (archive, taxonomy, single, etc...). In addition, this was causing problems with the top level pages as the permalink structure got messed up and I think was removing the first part after my site url. –  Brucep Jun 21 '13 at 17:55
    
Oh, Ok. Glad you figured it out. I'll leave my answer hear as I think people with the regular version of this problem are likely to google into this question. –  JPollock Jun 23 '13 at 1:02

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.