404 error on cpt slug as page slug
-
Hi,
i am using plugin AMP for WP – Accelerated Mobile Pages… Everything is OK, but there is this issue …
I have CPT (“doctors”), so in settings of plugin I turned AMP for CPT “doctors”.
URL “domain.tld/doctors/name/amp/” is OK, but URL “domain.tld/doctors/amp/” is 404 error page… On page “domain.tld/doctors/” is post type “page” with custom code…
There is a code for CPT in functions.php:
$args = array(
‘label’ => __( ‘Doctors’, ‘uem’ ),
‘description’ => __( ‘Doctors’, ‘uem’ ),
‘labels’ => $labels,
‘supports’ => array( ‘title’,’editor’, ‘revisions’, ‘thumbnail’,’excerpt’, ‘custom-fields’, ‘thumbnail’, ‘page-attributes’ ),
‘hierarchical’ => true,
‘public’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,
‘show_in_nav_menus’ => true,
‘show_in_admin_bar’ => true,
‘menu_position’ => 5,
‘can_export’ => true,
‘has_archive’ => false,
‘exclude_from_search’ => false,
‘publicly_queryable’ => true,
‘capability_type’ => ‘post’,
‘rewrite’ => array(
‘slug’ => _x(“doctors”,”uem”) ,
‘with_front’ => false
),‘rewrite’ => false,
‘query_var’ => true,
);// Registering your Custom Post Type
register_post_type( ‘doctors’, $args );Where is a error? I need AMP even for CPT slug “/doctors/”.
- The topic ‘404 error on cpt slug as page slug’ is closed to new replies.