0

I am using All in One SEO Version 4.2.7.1 I just added a custom post type using below code-

function RK_FAQs_register_post_types() {

    // Set UI labels for the recipes post type.
    $labels = array(
        'name' => _x( 'FAQs', 'Post Type General Name', 'hot-recipes' ),
        'singular_name' => _x( 'FAQ', 'Post Type Singular Name', 'hot-recipes' ),
        'menu_name' => __( 'RK FAQs', 'hot-recipes' ),
        'parent_item_colon' => __( 'Parent FAQ', 'hot-recipes' ),
        'all_items' => __( 'All FAQs', 'hot-recipes' ),
        'view_item' => __( 'View FAQ', 'hot-recipes' ),
        'add_new_item' => __( 'Add New FAQ', 'hot-recipes' ),
        'add_new' => __( 'Add New', 'hot-recipes' ),
        'edit_item' => __( 'Edit FAQ', 'hot-recipes' ),
        'update_item' => __( 'Update FAQ', 'hot-recipes' ),
        'search_items' => __( 'Search FAQ', 'hot-recipes' ),
        'not_found' => __( 'Not Found', 'hot-recipes' ),
        'not_found_in_trash' => __( 'Not found in Trash', 'hot-recipes' ),
    );

    // Set other arguments for the recipes post type.
    $args = array(
        'label' => __( 'rk_faqs', 'hot-recipes' ),
        'description' => __( 'FAQs.', 'hot-recipes' ),
        'labels' => $labels,
        'supports' => array(
            'title',
            'editor',
        ),
        'taxonomies' => array(),
        'hierarchical' => false,
        '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' => true,
        'exclude_from_search' => false,
        'publicly_queryable' => true,
        'capability_type' => 'post',
        'show_in_rest' => true,
    );

    // Registes the recipes post type.
    register_post_type( 'rk_faqs', $args );

}
add_action( 'init', 'RK_FAQs_register_post_types' );

Now when I am adding new post in admin panel, its loading and loading and then page dead. If I disable plugin, then all is Good.

There is no option found in plugin where I can disable it for custom post type.

Anyone has solution to disable it?

3
  • Have you asked the authors for support? They'd know better than us. And they'd probably be interested in code that breaks their plugin.
    – Rup
    Commented Sep 2, 2023 at 12:36
  • I don't know All-in-one SEO, but if it's just the edit post page you need to control and there's no built-in function for this then your options are probably 1) a mu plugin that test if the URL is admin edit and hooks options_active_plugins to remove AIO SEO; 2) write a high-priority admin_init hook that unregisters AIO SEO's admin_init actions before they get a chance to run.
    – Rup
    Commented Sep 2, 2023 at 12:39
  • Alternatively you can debug what's killing the page dead. What do you see in the server logs, or in the page source or browser console when this happens?
    – Rup
    Commented Sep 2, 2023 at 12:40

0

Your Answer

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