1

Sorry if my question sounds a bit confusing. So I have a page "About" and currently, I also have a Custom post type "Our Team".

I've set all the posts under the "Our Team" post type to have the URL as "/about/[post-title]"

Right now, both the page About and all the posts under /about/[post-title] are working perfectly but my page About also has a lot of pages under it and the urls are all

  • /about/board
  • /about/team
  • /about/mission

and after flushing the permalinks, all are now giving me a 404 not found :( All of the subpages under About can't be viewed anymore.

This is my custom post type code:

/**
 * Our Team CPT
 */
$labels = array(
    'name'               => 'Our Team',
    'singular_name'      => 'Team',
    'menu_name'          => 'Our Team',
    'add_new'            => 'Add Team',
    'add_new_item'       => 'Add New Team',
    'new_item'           => 'New Team',
    'edit_item'          => 'Edit Person',
    'view_item'          => 'View Team',
    'all_items'          => 'View Team',
    'search_items'       => 'Search the Team',
    'not_found'          => 'No Team Found',
    'not_found_in_trash' => __( 'No People found in Trash.', 'your-plugin-textdomain' ),
);

$args = array(
    'labels'            => $labels,
    'description'       => '',
    'public'            => true,
    'show_ui'           => true,
    'show_in_menu'      => true,
    'capability_type'   => 'page',
    'map_meta_cap'      => true,
    'hierarchical'      => false,
    'has_archive'       => false,
    'rewrite'           => array('slug' => 'about', 'with_front' => true, 'hierarchical' => false),
    'query_var'         => true,
    'supports'          => array('title','editor','page-attributes','post-formats'),
    'taxonomies'        => array('team_member_categories')
);
register_post_type( 'Team', $args );

What am I doing wrong?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.