Hey Guys,
I think this was addressed in a recent release but not sure If I have to “enable” the feature…
So I have a custom post type called ‘Bingo Reviews’, when I view the post it displays fine and dandy: http://www.freenodepositbingo.co.uk/bingo-reviews/wonder-bingo/
but…
If I try and view: http://www.freenodepositbingo.co.uk/bingo-reviews/ – I get a 404.
Any ideas? 
- Attended a Community Meetup
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Interviewed on the Envato Notes blog
Update your permalinks.
OR
Place:
flush_rewrite_rules();
After you’ve declared the custom post type in functions.php or wherever.
Thanks mate, tried the permalinks flush and your code but no joy.
My code ok?
register_post_type
(
'bingo_reviews', array
(
'labels' => array
(
'name' => 'Bingo Reviews',
'singular_name' => 'Bingo Review',
'add_new' => 'Add New Bingo Review',
'add_new_item' => 'Add New Bingo Review',
'edit' => 'Edit Bingo Reviews',
'edit_item' => 'Edit Bingo Review',
'new_item' => 'New Bingo Review',
'view' => 'View Bingo Review',
'view_item' => 'View Bingo Review',
'search_items' => 'Search Bingo Reviews',
'not_found' => 'No Bingo Reviews found',
'not_found_in_trash' => 'No Bingo Reviews found in Trash',
'parent' => 'Parent Bingo Review'
),
'supports' => array
(
'title',
'editor',
'excerpt',
//'trackbacks',
//'custom-fields',
'comments',
'revisions',
'thumbnail',
//'author',
//'page-attributes'
),
'public' => true,
'rewrite' => array('slug' => 'bingo-reviews'),
'query_var' => true,
'menu_position' => 4,
'menu_icon' => get_stylesheet_directory_uri() . '/elements/images/bingo_ball_admin.png'
)
);
- Attended a Community Meetup
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- Interviewed on the Envato Notes blog
Try the upper rewrite code but this time change the rewrite array object to true in your code. Place the rewrite function under the register_post_type function but within the init hook (i presume you use the init hook).
Thanks again, but no luck, works on another site but I am using taxonomies….
First, make sure you don’t have a regular page with “bingo-reviews” slug
Second, you need to add has_archive parameter when registering your custom post type to enable custom post type archives
read it here http://codex.wordpress.org/Function_Reference/register_post_type
Third, update your permalink again “twice” and test it again
So, the example code is,
register_post_type
(
'bingo_reviews', array
(
'labels' => array
(
'name' => 'Bingo Reviews',
'singular_name' => 'Bingo Review',
'add_new' => 'Add New Bingo Review',
'add_new_item' => 'Add New Bingo Review',
'edit' => 'Edit Bingo Reviews',
'edit_item' => 'Edit Bingo Review',
'new_item' => 'New Bingo Review',
'view' => 'View Bingo Review',
'view_item' => 'View Bingo Review',
'search_items' => 'Search Bingo Reviews',
'not_found' => 'No Bingo Reviews found',
'not_found_in_trash' => 'No Bingo Reviews found in Trash',
'parent' => 'Parent Bingo Review'
),
'supports' => array
(
'title',
'editor',
'excerpt',
//'trackbacks',
//'custom-fields',
'comments',
'revisions',
'thumbnail',
//'author',
//'page-attributes'
),
'public' => true,
'rewrite' => array('slug' => 'bingo-reviews'),
'has_archive' => true,
'query_var' => true,
'menu_position' => 4,
'menu_icon' => get_stylesheet_directory_uri() . '/elements/images/bingo_ball_admin.png'
)
);
@PrimaThemes Bingo! Thanking you sir 
