I am trying to create a custom post type for "Blogs". When I change rewrite to true I get 404 to the custom post type.

This is my custom post type code:

<?
  add_action('init', 'kula_custom_post_blog_posts_init');
  function kula_custom_post_blog_posts_init() 
  {
    $labels = array(
      'name' => 'Blogs',
      'singular_name' => 'Blog'
    );

    $args = array(
      'labels' => $labels,
      'public' => true,
      'publicly_queryable' => true,
      'show_ui' => true, 
      'show_in_menu' => true, 
      'query_var' => true,
      'rewrite' => true,
      'capability_type' => 'post',
      'has_archive' => true, 
      'hierarchical' => false,
      'menu_position' => null,
      'supports' => array('title','editor','author','thumbnail','excerpt','comments')
    ); 
    register_post_type('blog-post',$args);
  }
?>

That's practically copied right out of Codex. So I don't think that's the problem. I also checked my .htaccess file and it has all the right code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

What else might be causing the problem?

Thanks

link|improve this question
As usual, minutes after posting, it has been solved. All that was needed was I needed to re-save the permalinks in the back-end. Then update the .htaccess file with the code Wordpress gave me. – jasonaburton Nov 10 '11 at 15:37
feedback

closed as too localized by toscho yesterday

This question is unlikely to ever help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. See the FAQ for guidance on how to improve it.

Browse other questions tagged or ask your own question.