RankMath SEO metabox is not working with custom taxonomy

#885496
  • Resolved Matt
    Rank Math free

    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)

    WP admin screenshot 1
    WP admin screenshot 2
    WP admin screenshot 3

    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’);

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting Rank Math support.

    We released a quick Beta update you can try to see if that helps.

    Please enable the Beta update by following this:
    https://rankmath.com/kb/version-control/#beta-updates

    beta update

    If you are unable to see an update, please clear Rank Math’s transients from:
    WP Dashboard > Rank Math > Status & Tools > Database Tools > Remove Rank Math Transients > Remove transients
    remove transients rank math

    Please clear the caches, server, and WordPress after updating.

    You can disable the Beta updates once you update to the latest version and if the issue is fixed.

    We are here to assist. Thank you.

    Matt
    Rank Math free

    Whoa that was quick! =)
    Btw your beta update seems to fix the missing meta box! thank you so much!
    Is it safe to deploy on a Production environment?
    Best regards
    Matt

    Hello,

    While the fix is already applied in the beta version, beta updates are not meant to be installed on live/production sites as they can break.

    We highly recommend that you install beta updates only on a testing or staging environment, and never on your live sites.

    In this case, we suggest waiting for it to be pushed to the latest stable version, which will happen very soon.

    We appreciate your patience in this matter.

    Looking forward to helping you.

    Matt
    Rank Math free

    Thank you very much for quick response. Any ETA on when the 1.0.229 will be released?
    -M

    Matt
    Rank Math free

    Ok, so in the meantime while this is being patched, here is my workaround if someone finds this post.

    The key thing is that the metadata is available on the frontend, only the wp-admin is not working in the current release.

    Workaround 1: Update your RankMath to 1.0.229-beta or higher temporarily following instructions from this thread > edit your taxonomy boxes > roll back RankMath to the official release. The updated metadata will appear on the frontend. If you need to make changes, you can enable the beta again.

    Workaround 2: Update the SEO metadata programmatically – e.g., with WP-CLI – this has the benefit of not needing to tinker with the beta at all.

    I’ve created a quick blog post with more details and the code ready to use if you’re interested: Bulk-update the WordPress taxonomies metadata programatically

    Many thanks,
    Matt

    Hello,

    Thank you for the workarounds. The fix for this is in the beta plugin and it would be release publicly after we’ve fully tested it internally.

    Thank you for choosing Rank Math

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

You must be logged in to reply to this ticket.