I have a website that, using ACF Pro, I have created several Custom Post Types (CPTs) for. All using ACF Pro. Of them, 6 of the CPTs are showing fine with the archive and single templates. They are: Blogs, Case Studies, Datasheets, Events, In The News, and Press Releases.
The remaining one (Videos) is fine viewing the archive - both posts show on it, but I'm getting 404 errors when trying to view the individual posts.
This is happening in both the DEV environment on Kinsta and in my local environment on my workstation.
I have tried the following in my local and my DEV Server environments:
- Using a default theme ("Twenty Twenty-Two")
- Removing all the custom fields from these 2 post types leaving one to test;
- Deleting and rebuilding the CPTs that are broken;
- Flushing the permalinks (saving permalinks);
- Clearing my cache;
- Different Browsers (Chrome and Edge)
- Deleting and rebuilding the posts with different slugs;
- Ensured there are no pages (or other posts) with the same slugs (at least not that I can see in the admin);
- Disabling all plugins except ACF;
- also removed the categories that contained similar slugs, then re-added with different slugs I'm not using any customized rewrite rules. Whatever, Wordpress has and whatever is on the Kinsta server(s) is what's in use.
None of these has corrected the issue. Here is a link to the archive for the Videos. As you can see, it works fine, but clicking on either of the individual posts is when the 404 appears: https://stg-patraprime-patradev.kinsta.cloud/resources/videos/
I'm very confused as to why this post type is the issue and all the other CPTs are fine.
Here's the exported JSON of both the blogs CPT (working) and the Videos CPT (breaking):
{
"key": "post_type_649b3505216bd",
"title": "Blogs",
"menu_order": 0,
"active": true,
"post_type": "blogs",
"advanced_configuration": true,
"import_source": "",
"import_date": "",
"labels": {
"name": "Blogs",
"singular_name": "Blog",
"menu_name": "Blogs",
"all_items": "All Blogs",
"edit_item": "Edit Blog",
"view_item": "View Blog",
"view_items": "View Blogs",
"add_new_item": "Add New Blog",
"add_new": "Add New Blog",
"new_item": "New Blog",
"parent_item_colon": "Parent Blog:",
"search_items": "Search Blogs",
"not_found": "No blogs found",
"not_found_in_trash": "No blogs found in Trash",
"archives": "Blog Archives",
"attributes": "Blog Attributes",
"featured_image": "",
"set_featured_image": "",
"remove_featured_image": "",
"use_featured_image": "",
"insert_into_item": "Insert into blog",
"uploaded_to_this_item": "Uploaded to this blog",
"filter_items_list": "Filter blogs list",
"filter_by_date": "Filter blogs by date",
"items_list_navigation": "Blogs list navigation",
"items_list": "Blogs list",
"item_published": "Blog published.",
"item_published_privately": "Blog published privately.",
"item_reverted_to_draft": "Blog reverted to draft.",
"item_scheduled": "Blog scheduled.",
"item_updated": "Blog updated.",
"item_link": "Blog Link",
"item_link_description": "A link to a blog."
},
"description": "For content marketing on new information about products and services, reviews, opinions, and reputation management",
"public": true,
"hierarchical": true,
"exclude_from_search": false,
"publicly_queryable": true,
"show_ui": true,
"show_in_menu": true,
"admin_menu_parent": "",
"show_in_admin_bar": true,
"show_in_nav_menus": true,
"show_in_rest": true,
"rest_base": "",
"rest_namespace": "wp\/v2",
"rest_controller_class": "WP_REST_Posts_Controller",
"menu_position": "",
"menu_icon": "dashicons-welcome-write-blog",
"rename_capabilities": false,
"singular_capability_name": "post",
"plural_capability_name": "posts",
"supports": [
"title",
"custom-fields"
],
"taxonomies": [
"post_tag",
"category"
],
"has_archive": true,
"has_archive_slug": "resources\/blogs",
"rewrite": {
"permalink_rewrite": "custom_permalink",
"slug": "resources\/blogs",
"with_front": "1",
"feeds": "1",
"pages": "1"
},
"query_var": "post_type_key",
"query_var_name": "",
"can_export": true,
"delete_with_user": false,
"register_meta_box_cb": "",
"enter_title_here": ""
},
{
"key": "post_type_649b3f54635ce",
"title": "Videos",
"menu_order": 0,
"active": true,
"post_type": "video",
"advanced_configuration": true,
"import_source": "",
"import_date": "",
"labels": {
"name": "Videos",
"singular_name": "Video",
"menu_name": "Videos",
"all_items": "All Videos",
"edit_item": "Edit Video",
"view_item": "View Video",
"view_items": "View Videos",
"add_new_item": "Add New Video",
"add_new": "",
"new_item": "New Video",
"parent_item_colon": "Parent Video:",
"search_items": "Search Videos",
"not_found": "No videos found",
"not_found_in_trash": "No videos found in Trash",
"archives": "Video Archives",
"attributes": "Video Attributes",
"featured_image": "",
"set_featured_image": "",
"remove_featured_image": "",
"use_featured_image": "",
"insert_into_item": "Insert into video",
"uploaded_to_this_item": "Uploaded to this video",
"filter_items_list": "Filter videos list",
"filter_by_date": "Filter videos by date",
"items_list_navigation": "Videos list navigation",
"items_list": "Videos list",
"item_published": "Video published.",
"item_published_privately": "Video published privately.",
"item_reverted_to_draft": "Video reverted to draft.",
"item_scheduled": "Video scheduled.",
"item_updated": "Video updated.",
"item_link": "Video Link",
"item_link_description": "A link to a video."
},
"description": "Videos produced by Patra about Patra services",
"public": true,
"hierarchical": true,
"exclude_from_search": false,
"publicly_queryable": true,
"show_ui": true,
"show_in_menu": true,
"admin_menu_parent": "",
"show_in_admin_bar": true,
"show_in_nav_menus": true,
"show_in_rest": true,
"rest_base": "",
"rest_namespace": "wp\/v2",
"rest_controller_class": "WP_REST_Posts_Controller",
"menu_position": "",
"menu_icon": "dashicons-video-alt",
"rename_capabilities": false,
"singular_capability_name": "post",
"plural_capability_name": "posts",
"supports": [
"title",
"custom-fields"
],
"taxonomies": [
"post_tag",
"category"
],
"has_archive": true,
"has_archive _slug": "resources\/videos",
"rewrite": {
"permalink_rewrite": "custom_permalink",
"slug": "resources\/videos",
"with_front": "1",
"feeds": "1",
"pages": "1"
},
"query_var": "post_type_key",
"query_var_name": "",
"can_export": true,
"delete_with_user": false,
"register_meta_box_cb": "",
"enter_title_here": ""
},