Yoast fields not showing on Custom Post Type

I am working on a bespoke site that has several custom post types. However, Yoast seems to not be showing any of the keyword, description fields for these on the custom post overview page (not the individual posts themselves).

I have spent lots of time Googling for a solution but adding:

Read More
'public' => true
'hierarchical' => true,
'has_archive' => true,

has not resolved the problem. Please see full snippet below:

register_taxonomy_for_object_type('category', 'portfolio'); // Register            Taxonomies for Category
register_taxonomy_for_object_type('post_tag', 'portfolio');
register_post_type('portfolio', // Register Custom Post Type
    array(
    'labels' => array(
        'name' => __('Portfolio', 'html5blank'), // Rename these to suit
         'singular_name' => __('Portfolio', 'html5blank'),
        'add_new' => __('Add New', 'html5blank'),
        'add_new_item' => __('Add New Item', 'html5blank'),
        'edit' => __('Edit', 'html5blank'),
        'edit_item' => __('Edit Item', 'html5blank'),
        'new_item' => __('New Item', 'html5blank'),
        'view' => __('View Item', 'html5blank'),
        'view_item' => __('View Item', 'html5blank'),
        'search_items' => __('Search Item', 'html5blank'),
        'not_found' => __('No Item', 'html5blank'),
        'not_found_in_trash' => __('No Item found in Trash', 'html5blank')
    ),
    'public' => true,
    'menu_icon' => 'dashicons-images-alt2',
    'hierarchical' => true, // Allows your posts to behave like Hierarchy Pages
    'has_archive' => true,
    'supports' => array(
        'title',
    ), // Go to Dashboard Custom HTML5 Blank post for supports
    'can_export' => true, // Allows export in Tools > Export
    'taxonomies' => array(
        'post_tag',
        'category'
    ) // Add Category and Post Tags support
));

Has anybody else experienced this problem?

Related posts

1 comment

Comments are closed.