I have a custom post type called CASINOS with slugs is casinos wich has _archive set to false

and I have a page called Casino with slug casino ( singular)

The problem is when creating a child with a parent Casino page, the page returns not found. But if I change the casino page slug to something other than casinos or casino, it will work fine. so what I have is

www.example.com/casino ( parent ) www.example.com/casinos/custom-post-type-slug ( casino post type)

what I want to achieve is


here I have the casino post type has_archieve set to false

  • What are the full arguments you're using to register the post type? – Jacob Peattie Apr 20 at 7:21
  • 'label' =>Casinos 'labels' => $casino_labels, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 13, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'has_archive' => false, 'capability_type' => 'page', 'menu_icon' => 'dashicons-admin-home', 'rewrite' => array('slug' => 'casinos', 'with_front' => false), ); – henok tsegaye Apr 20 at 7:26
  • did you try to go to settings > permalinks > use plain once for trial and check the post name and save to test again? Make sure you haven't got anything called casion for rewrite including taxonomy and so on and make sure there is no other plugins interfere your test. – simongcc Apr 20 at 7:41
  • i Did check that , and there were some wired taxonomy with slug casino , thank you so much – henok tsegaye Apr 20 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.