CPT Archive page > 404 since turning on MU
-
We have a custom post type called Locations.
Since turning on subdirectory MU, the locations’ URLs have changed from:
https://mandoemedia.com/locations/jacksonville/
to
https://mandoemedia.com/blog/locations/jacksonville/
This is okay in theory.
However, the Locations archive page is now producing a 404 page.
ie. Both
https://mandoemedia.com/locations/
&https://mandoemedia.com/blog/locations/
produce a 404.Our Yoast SEO sitemap for Locations contains the URL
https://mandoemedia.com/blog/locations/
as if that is the correct URL, but that is producing the 404.In our CPT definition, we have:
function create_locations() { $labels = array( 'name' => _x( 'Locations', 'Post Type General Name', 'textdomain' ), 'singular_name' => _x( 'Locations', 'Post Type Singular Name', 'textdomain' ), 'menu_name' => _x( 'Locations', 'Admin Menu text', 'textdomain' ), 'name_admin_bar' => _x( 'Locations', 'Add New on Toolbar', 'textdomain' ), 'archives' => __( 'Locations Archives', 'textdomain' ), 'attributes' => __( 'Locations Attributes', 'textdomain' ), 'parent_item_colon' => __( 'Parent Locations:', 'textdomain' ), 'all_items' => __( 'All Locations', 'textdomain' ), 'add_new_item' => __( 'Add New Locations', 'textdomain' ), 'add_new' => __( 'Add New', 'textdomain' ), 'new_item' => __( 'New Locations', 'textdomain' ), 'edit_item' => __( 'Edit Locations', 'textdomain' ), 'update_item' => __( 'Update Locations', 'textdomain' ), 'view_item' => __( 'View Locations', 'textdomain' ), 'view_items' => __( 'View Locations', 'textdomain' ), 'search_items' => __( 'Search Locations', 'textdomain' ), 'not_found' => __( 'Not found', 'textdomain' ), 'not_found_in_trash' => __( 'Not found in Trash', 'textdomain' ), 'featured_image' => __( 'Featured Image', 'textdomain' ), 'set_featured_image' => __( 'Set featured image', 'textdomain' ), 'remove_featured_image' => __( 'Remove featured image', 'textdomain' ), 'use_featured_image' => __( 'Use as featured image', 'textdomain' ), 'insert_into_item' => __( 'Insert into Locations', 'textdomain' ), 'uploaded_to_this_item' => __( 'Uploaded to this Locations', 'textdomain' ), 'items_list' => __( 'Locations list', 'textdomain' ), 'items_list_navigation' => __( 'Locations list navigation', 'textdomain' ), 'filter_items_list' => __( 'Filter Locations list', 'textdomain' ), ); $args = array( 'label' => __( 'Locations', 'textdomain' ), 'description' => __( '', 'textdomain' ), 'labels' => $labels, 'menu_icon' => 'dashicons-location-alt', 'supports' => array('title', 'excerpt', 'thumbnail', 'page-attributes', 'post-formats'), 'taxonomies' => array(), 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'hierarchical' => false, 'exclude_from_search' => false, 'show_in_rest' => true, 'publicly_queryable' => true, 'capability_type' => 'post', ); register_post_type( 'locations', $args );
Note:
'has_archive' => true,
.Other pages & posts are displaying fine.
Help appreciated.
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.