Hello,
We apologize for the issue you are facing with the breadcrumbs on your website. It seems that the taxonomy name is not appearing on your category page, which can be adjusted through the settings in Rank Math.
To ensure that the taxonomy name appears in your breadcrumbs on archive pages (like your category page), you can check the Hide Taxonomy Name option in the breadcrumbs settings. If this option is enabled, it will remove the taxonomy name from the breadcrumbs. We recommend keeping this setting off to display the taxonomy name.
Here’s how you can check and adjust this setting:
- Go to your WordPress Dashboard.
- Navigate to Rank Math SEO > General Settings > Breadcrumbs.
- Look for the Hide Taxonomy Name option and ensure it is disabled.
If you have already checked this setting and the issue persists, please reply to this ticket with any additional details or screenshots, and a human agent from our support team will assist you further.
Thank you for raising this concern!
Sources:
How to Enable Breadcrumbs on Your Website With Rank Math SEO » Rank Math
This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.
I have already toggled this off.
https://imgur.com/a/5vZ1HTI
Hi, can you please reply asap? We waiting to launch this website. Thank you.
Hello,
Sorry for the delay in response.
Somehow, your ticket has been moved to pending moderation. We have gone ahead and approved it – apologies for the inconvenience.
Back to your issue, at the moment Rank Math can’t add the CPT name in the breadcrumbs of the associated taxonomies like the category at the moment.
However, we can use our filter code to forcibly add the CPT name in your category pages. Please use the following code:
add_filter('rank_math/frontend/breadcrumb/items', function ($crumbs, $class) {
if (is_tax() || is_category()) {
$post_type_name = 'publications';
$associated_post_types = get_post_types([ 'public' => true ], 'names');
foreach ($associated_post_types as $post_type) {
if($post_type == $post_type_name){
$cpt_obj = get_post_type_object($post_type_name);
if ($cpt_obj) {
$cpt_crumb = [
$cpt_obj->labels->singular_name,
get_post_type_archive_link($post_type_name),
];
array_splice($crumbs, 1, 0, [ $cpt_crumb ]);
}
break;
}
}
}
return $crumbs;
}, 10, 2);
You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps.