I have a custom post type "news_updates" which I have not given custom tags or categories. I have however created a normal tag (not attached to a custom post type), and assigned it to a particular news_updates single post. The tag shows up in the tag list when viewing the post.
However, while I have permalinks set to %postname%, when attempting to find all posts assigned this tag, or any tag, it yields a 404 error. When I set permalinks to default, this isn't an issue, and the tag archive returns fine.
I have no idea why this is, as the name of the tag isn't even remotely close to any of my custom post types or taxonomies, I have tried changing the permalinks settings back and forth, refreshing, flush_rewrite_rules. Nothing worked except changing the permalinks back to default.
Here is the code for my custom post type. I'm not using any plugins to create my post types or taxonomies.
function custom_post_news_updates() {
// creating (registering) the custom type
register_post_type( 'news_updates', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */
// let's now add all the options for this post type
array('labels' => array(
'name' => __('News Update Posts', 'jointstheme'), /* This is the Title of the Group */
'singular_name' => __('News Update', 'jointstheme'), /* This is the individual type */
'all_items' => __('All News Update Post', 'jointstheme'), /* the all items menu item */
'add_new' => __('Add New', 'jointstheme'), /* The add new menu item */
'add_new_item' => __('Add New News Update', 'jointstheme'), /* Add New Display Title */
'edit' => __( 'Edit', 'jointstheme' ), /* Edit Dialog */
'edit_item' => __('Edit News Update', 'jointstheme'), /* Edit Display Title */
'new_item' => __('New News Update', 'jointstheme'), /* New Display Title */
'view_item' => __('View News Update', 'jointstheme'), /* View Display Title */
'search_items' => __('Search News Update', 'jointstheme'), /* Search Custom Type Title */
'not_found' => __('Nothing found in the Database.', 'jointstheme'), /* This displays if there are no entries yet */
'not_found_in_trash' => __('Nothing found in Trash', 'jointstheme'), /* This displays if there is nothing in the trash */
'parent_item_colon' => ''
), /* end of arrays */
'description' => __( 'This is where News and Updates posts go.', 'jointstheme' ), /* Custom Type Description */
'public' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'show_ui' => true,
'query_var' => true,
'menu_position' => 4, /* this is what order you want it to appear in on the left hand side menu */
'menu_icon' => get_stylesheet_directory_uri() . '/library/images/custom-post-icon.png', /* the icon for the custom post type menu */
'rewrite' => false,//array( 'slug' => 'news-updates', 'with_front' => false ), /* you can specify its url slug */
'has_archive' => 'news-updates-archive', /* you can rename the slug here */
'capability_type' => 'post',
'hierarchical' => false,
/* the next one is important, it tells what's enabled in the post editor */
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', /*'sticky'*/)
) /* end of options */
); /* end of register post type */
//these both make it so the custom post type can use the global categories and tags
/* this adds your post categories to your custom post type */
register_taxonomy_for_object_type('category', 'news_updates');
/* this adds your post tags to your custom post type */
register_taxonomy_for_object_type('post_tag', 'news_updates');
}
add_action( 'init', 'custom_post_news_updates');
Any help appreciated. I've searched, but to no avail.