Breadcrumbs – hierarchical categories and subcategories

#710448
  • Resolved Anonymous
    Rank Math free

    I believe there is an issue with the plugin…

    All my settings are correct.

    I use ACF and created a taxonomy.

    My main taxonomy is “Plant Classification” and is enabled in the post type settings in the Rank Math SEO admin.

    The option to show categories is also enabled in the breadcrumbs settings in Rank Math SEO.

    In the taxonomy I have the following hierarchy.

    Division > Class > Order > Family > Genus

    At first, Breadcrumbs was only showing “Division” > “Class” > “Order” and was not showing the plant’s “Family” and “Genus”.

    I found it strange to show the hierarchy in half.

    So I tried enabling and disabling the breadcrumbs options in the administration.

    I disabled the option “Show Homepage Link”

    Then I enabled the “Show Homepage Link” option again.

    After that no option is shown in the breadcrumbs only the first category of the hierarchy “Division”
    all subcategories are not showing.

    Something is happening because everything is fine in the settings.

    In the server error log I am getting this. I don’t know if there’s anything related.

    [proxy_fcgi:error: Got error ‘PHP message: PHP Warning: Undefined array key “post_content” in
    /public_html/wp-content/plugins/seo-by-rank-math/includes/modules/content-ai/class-content-ai-page.php on line 326’, referer: wp-admin/edit.php?post_type=acf_views

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

    We’re sorry to hear about the issue you’re facing with the breadcrumbs on your website. It seems like you’ve already checked and ensured that all the settings are correct, and you’ve also tried enabling and disabling the breadcrumbs options in the administration.

    The error message you’ve shared from the server log seems to be related to a PHP warning in the Rank Math plugin. This could potentially be causing the issue with the breadcrumbs not displaying correctly.

    Since this seems to be a technical issue that might require deeper investigation, I’d recommend assigning this ticket to our support team by clicking on the “Assign to Human Agent” button below. Our support experts will look into this matter and provide you with a solution as soon as possible.

    Thank you for bringing this to our attention, and we appreciate your patience as we work to resolve this issue for you.

    Sources:
    How to Enable Breadcrumbs on Your Website With Rank Math SEO » Rank Math
    Rank Math General Settings
    How to Fix “Invalid object type for field ‘item'” » Rank Math

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    I tried removing the plugin, deleting the mysql tables and then reinstalling the plugin, but it seems to take the previous settings. It continues with an error without showing the category hierarchy.

    Anonymous
    Rank Math free

    I added the shortcode in Elementor. [rank_math_breadcrumb]

    The code has been added to show “Plants” (single page) of custom ACF post type.

    Hello,

    Could you please share the expected breadcrumbs on that URL? Please also share the URLs of each to check the hierarchical structure.

    Also, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    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.

    Anonymous
    Rank Math free

    What is expected

    Plantas > Magnoliophyta > Liliopsida > Alismatales > Araceae > Monstera > Monstera deliciosa (Costela-de-adão)

    Post Type

    – Plantas (Post Type Archive)

    Taxonomy “Classificação”

    – Magnoliophyta (First item in the hierarchy)
    – Liliopsida
    – Alismatales
    – Araceae
    – Monstera

    Title of post

    – Monstera deliciosa (Costela-de-adão)

    Anonymous
    Rank Math free

    I don’t feel comfortable giving access to my system. If you guys don’t know what it could be, I’ll switch to another plugin

    Hello,

    If you want to include all subcategories in the breadcrumbs, then you will have to select the last subcategory as the primary category of the post. Monstera should be the primary category for the example you have shared. Here is a guide to help you select the Primary Category: https://rankmath.com/kb/how-to-choose-a-primary-category/

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Hi guys

    I understand, in each post I will have to inform the primary category. In Yoast it was automatic. I didn’t understand that it was individual for each post on Rank Math.

    I have another question. Post Type archive “Plantas” is being shown only on the post. It does not appear within the taxonomy category. Is that so?

    …/classificacao/magnoliophyta/liliopsida/alismatales/araceae/monstera/

    Thanks!

    Hello,

    You can use the following filter to adjust the Rank Math breadcrumbs to your desired output:

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	$post_type = get_post_type(get_queried_object());
    	
    	if ($post_type == 'your_post_type') {
    		$crumbs[1][0] = 'Plantas';
    		$crumbs[1][1] = 'https://plantandovida.com/plantas/';
    	}
    
    	return $crumbs;
    }, 10, 2);
    

    Change your_post_type with the actual post type of your website.

    Here is a guide you can follow to add this filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes.

    Thank you.

    Anonymous
    Rank Math free

    Thank you!

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Breadcrumbs – hierarchical categories and subcategories’ is closed to new replies.