-
Hi there,
I’m a web developer working on my site, recently switched to RankMath but having some problems.
RankMath SEO metabox is not showing in a custom taxonomy despite being enabled in titles & meta tab. Do I need to add something in my custom taxonomy definition as well some filter or hook perhaps? I wastn’ able to find anything via the web/ai.
The box shows fine for standard taxonomies such as Tags and Categories.
(btw also the Yoast’s meta box shows no problem on custom taxonomies)
Here’s my code for custom taxonomy:
/**
* Register custom taxonomies
*/
function mattrs_work_taxonomies() {// Register the ‘Work post type’ taxonomy
$labels_work_post_type = array(
‘name’ => _x(‘Showcase Types’, ‘taxonomy general name’),
‘singular_name’ => _x(‘Showcase Type’, ‘taxonomy singular name’),
‘search_items’ => __(‘Search Showcase Types’),
‘all_items’ => __(‘All Showcase Types’),
‘parent_item’ => __(‘Parent Showcase Type’),
‘parent_item_colon’ => __(‘Parent Showcase Type:’),
‘edit_item’ => __(‘Edit Showcase Type’),
‘update_item’ => __(‘Update Showcase Type’),
‘add_new_item’ => __(‘Add New Showcase Type’),
‘new_item_name’ => __(‘New Showcase Type Name’),
‘menu_name’ => __(‘Showcase Types’),
‘view_item’ => __(‘View Showcase Types’),
);$args_work_post_type = array(
‘labels’ => $labels_work_post_type,
‘rewrite’ => array(‘slug’ => ‘showcase’),
// enable in Query Loop block filter, Editor sidebar and as Meta block
‘show_in_rest’ => true,
);register_taxonomy(‘work_post_type’, [‘portfolio’], $args_work_post_type);
}
add_action(‘init’, ‘mattrs_work_taxonomies’);
You must be logged in to reply to this ticket.