962 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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? :)

2580 posts Put a Donk On It
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+10 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
  • Has been part of the Envato Community for over 5 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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'

                  ) 
            );
2580 posts Put a Donk On It
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+10 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
  • Has been part of the Envato Community for over 5 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
EireStudio says

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

147 posts
  • Has been part of the Envato Community for over 3 years
  • Has referred 10+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
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
  • Has been part of the Envato Community for over 5 years
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
EireStudio says

@PrimaThemes Bingo! Thanking you sir :)

by
by
by
by
by
by