• 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/”.

    • This topic was modified 6 years, 7 months ago by libis.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor ampforwp

    (@ampforwp)

    Hi Libis,

    Could you send me the Proper Link of the CPT “domain.tld/doctors/name/amp/”

    Also this “domain.tld/doctors/amp/” wherein you’re facing the 404 error so that I can check it for you, also may I know since when you’re facing this issue?

    Thread Starter libis

    (@libis)

    @ampforwp may i send you a email? i have this url on dev server, i will send you login to access to this url, ok? pls what is your email?

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi Libis,

    You contact us on [email protected]

    Our team will debug and give you an update on it.

    exactly the same problem

    Thread Starter libis

    (@libis)

    @ampforwp thx, i sent you email with urls. thx for help

    Plugin Contributor ampforwp

    (@ampforwp)

    Hey Libis,

    You’re welcome.

    Thanks for sending the e-mail, one of our team member’s will work on it and get back to you with an update on it.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi Pumasin,

    Could you send me the Proper Link of the CPT on which you’re facing the issue so that I can check it for you, also may I know since when you’re facing this issue?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘404 error on cpt slug as page slug’ is closed to new replies.