New post type doesn’t have meta title or description on SERP

#34452
  • Resolved Robert
    Rank Math free

    Hi

    I create a new post type below. But new post type doesn’t have meta title or description on SERP. Maybe something wrong with the snippet below. The problem I don’t know what it is. Can you kindly help? Thank you.

    /*Register WordPress  Gutenberg CPT */
    function al_post_type() {
    
        register_post_type( 'loancase',
            // WordPress CPT Options Start
            array(
                'labels' => array(
                    'name' => __( 'Story' ),
                    'singular_name' => __( 'Loan Case' )
                ),
                'has_archive' => true,
                'public' => true,
                'show_in_rest' => true,
    			'rewrite' => array('slug' => 'loancase'),
    			'capability_type' => 'post',
                'supports' => array( 'title', 'editor', 'revisions' )
            )
        );
    }
     
    add_action( 'init', 'al_post_type' );
    • This topic was modified 4 years, 1 month ago by Robert.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The new post type doesn’t have a meta description on SERP.
    I create a new post type below. But the new post type doesn’t show meta description on SERP.
    like this,
    file:///C:/Users/Hitech/Pictures/Screenshots/Screenshot%20(257).png

    please give me solution.

    • This reply was modified 4 years, 1 month ago by Mayur Arya.

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Is the Rank Math metabox visible when editing posts within this CPT?

    Your image link seems to be pointing to your computer. Could you please share a new screenshot via https://snipboard.io/

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Robert
    Rank Math free

    Hi

    I dont use CPT. I simply add the code below in the function.php. IS the code correct? Thank you.

    /*Register WordPress  Gutenberg */
    function al_post_type() {
    
        register_post_type( 'loancase',
            // WordPress CPT Options Start
            array(
                'labels' => array(
                    'name' => __( 'Story' ),
                    'singular_name' => __( 'Loan Case' )
                ),
                'has_archive' => true,
                'public' => true,
                'show_in_rest' => true,
    			'rewrite' => array('slug' => 'loancase'),
    			'capability_type' => 'post',
                'supports' => array( 'title', 'editor', 'revisions' )
            )
        );
    }
     
    add_action( 'init', 'al_post_type' );

    My site meta discriotion is not show in Google SERP result.
    Meta discription section is empty.
    Like this exampal— snapshot
    https://1.bp.blogspot.com/-qYgJSgyKc6Y/XlgeyxK-Z-I/AAAAAAAAAQc/luT2Osmh4C875QgS_jY4LR_fPFFI9sJ_wCLcBGAsYHQ/w945-h600-p-k-no-nu/Screenshot%2B%2528257%2529.png
    Please give me Selution

    Todd
    Rank Math free

    Hi Robert,

    Please check your CPT specific title settings at WordPress Dashboard > Rank Math > Titles & Meta > *cpt*

    Mayur, please open a new ticket with your issue so we can help.

    Robert
    Rank Math free

    Hi Todd,

    I update to the snippet below in function.php but still not helps. I create a archive template using Elementor for the new post type. However, I cannot find Titles & Meta setting anywhere. Please kindly advise. Thank you.

    // Register Custom Post Type Loan Case
    function create_loancase_cpt() {
    
    	$labels = array(
    		'name' => _x( 'Loan Cases', 'Post Type General Name', 'textdomain' ),
    		'singular_name' => _x( 'Loan Case', 'Post Type Singular Name', 'textdomain' ),
    		'menu_name' => _x( 'Loan Cases', 'Admin Menu text', 'textdomain' ),
    		'name_admin_bar' => _x( 'Loan Case', 'Add New on Toolbar', 'textdomain' ),
    		'archives' => __( 'Loan Case Archives', 'textdomain' ),
    		'attributes' => __( 'Loan Case Attributes', 'textdomain' ),
    		'parent_item_colon' => __( 'Parent Loan Case:', 'textdomain' ),
    		'all_items' => __( 'All Loan Cases', 'textdomain' ),
    		'add_new_item' => __( 'Add New Loan Case', 'textdomain' ),
    		'add_new' => __( 'Add New', 'textdomain' ),
    		'new_item' => __( 'New Loan Case', 'textdomain' ),
    		'edit_item' => __( 'Edit Loan Case', 'textdomain' ),
    		'update_item' => __( 'Update Loan Case', 'textdomain' ),
    		'view_item' => __( 'View Loan Case', 'textdomain' ),
    		'view_items' => __( 'View Loan Cases', 'textdomain' ),
    		'search_items' => __( 'Search Loan Case', '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 Loan Case', 'textdomain' ),
    		'uploaded_to_this_item' => __( 'Uploaded to this Loan Case', 'textdomain' ),
    		'items_list' => __( 'Loan Cases list', 'textdomain' ),
    		'items_list_navigation' => __( 'Loan Cases list navigation', 'textdomain' ),
    		'filter_items_list' => __( 'Filter Loan Cases list', 'textdomain' ),
    	);
    	$args = array(
    		'label' => __( 'Loan Case', 'textdomain' ),
    		'description' => __( '', 'textdomain' ),
    		'labels' => $labels,
    		'menu_icon' => 'dashicons-admin-multisite',
    		'supports' => array('title', 'editor', 'thumbnail', 'revisions'),
    		'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' => false,
    		'publicly_queryable' => true,
    		'capability_type' => 'post',
    	);
    	register_post_type( 'loancase', $args );
    
    }
    add_action( 'init', 'create_loancase_cpt', 0 );

    Hello,

    Thanks for getting back to us.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘New post type doesn’t have meta title or description on SERP’ is closed to new replies.