962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

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? :)

2509 posts Put a Donk On It
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Attended a Community Meetup
  • Referred between 100 and 199 users
  • Contributed a Tutorial to a Tuts+ Site
+5 more
ThemeProvince says

Update your permalinks.

OR

Place:

flush_rewrite_rules();

After you’ve declared the custom post type in functions.php or wherever.

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

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'

                  ) 
            );
2509 posts Put a Donk On It
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Attended a Community Meetup
  • Referred between 100 and 199 users
  • Contributed a Tutorial to a Tuts+ Site
+5 more
ThemeProvince says

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).

962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

Thanks again, but no luck, works on another site but I am using taxonomies….

147 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Sold between 250 000 and 1 000 000 dollars
FlexiPress says

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'

                  ) 
            );
962 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Sold between 10 000 and 50 000 dollars
EireStudio says

@PrimaThemes Bingo! Thanking you sir :)

by
by
by
by
by
by