No categories in breadcrumbs – Errors in Google Search Console

#217915
  • Resolved Plimfec
    Rank Math free

    Hi there,

    I opened a topic about this issue in the WordPress support section earlier:
    https://wordpress.org/support/topic/no-category-in-breadcrumbs/

    I was asked to post it here again.

    Problem is: there are no categories displayed in my breadcrumb trail. No main, no child. When there is no child category, just one main category, it’s not displayed either. Just empty space between the separators.

    This applies to both the post pages and the Woocommerce product pages.

    My settings:

    Breadcrumbs function enabled

    Activated by the switch:
    – Rank Math > General settings > Breadcrumbs > Show categories

    Selected ‘Categories’ here:
    – Rank Math > Titles & Meta > Post Types > Posts > Primary Taxonomy > Categories

    I tried to make the child category primary as well, but that didn’t help either.

    WordPress, template and all plugins are updated to the last versions.

    Last days I validated in Google Search Console, regarding these errors:

    Failed validation:
    – Either ‘name’ or ‘item.name’ should be specified
    – Invalid object type for field ‘item’
    – Incorrect value type ‘@id’

    Still in validation:
    – data-vocabulary.org schema deprecated
    – Missing field ‘itemListElement’

    Problems in the code should be:

    Google Search Console - Errors in code

    All errors are about empty fields for the category (main and child) in the Rank Math section inside the code.

    I switched off the Rank Math breadcrumbs for now, to prevent Google giving me penalties for my shop pages. The current breadcrumbs you see on my website come from the plugin Breadcrumb NavXT (pages, posts) and Woocommerce (product pages).

    If you wish I can switch the Rank Math breadcrumbs back on again, using the shortcode to show them in an old post (url in sensitive data section). Please let me know if you need this, thanks!

    Thank you for your time!
    Plimfec

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    In this case, 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/

    Alternatively, you can also create a staging site with the same issue as it seems that your site is currently live. This will also avoid your site getting any issues upon troubleshooting.

    Here is a guide that could be really useful for you on how to create a staging site: https://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/

    We really look forward to helping you.

    Thank you.

    Hi Reinelle,

    Thanks for your reply.

    I did clone my website for you, so you can login there. Please see the sensitive data section.

    You’ll see all breadcrumbs twice. At the top the existing breadcrumbs (via Breadcrumb NavXT and Woocommerce). Below the Rank math breadcrumbs.

    Problem pages (examples):

    (1) No category in single post:
    https://dwarsliggers.leestipper.nl/nieuws-acties/nieuws/nieuwe-dwarsliggers-van-mei-2021/

    (2) No main and child category in single product pages:
    https://dwarsliggers.leestipper.nl/dwarsligger/arthur-japin-kolja/

    Two additional questions:

    (3) On the page for search results my existing breadcrumbs (here at the bottom) show Home › Zoekresultaten voor ‘deze’, while the Rank Math breadcrumbs just show Home. How to change the Rank Math breadcrumbs to show my old format? Example:
    https://dwarsliggers.leestipper.nl/?s=deze&post_type=product

    (4) Tag page -> How to change Products tagged “Gezin” into my old format Home › Dwarsliggers met als trefwoord ‘Gezin’? Where can I translate this sentence? Example:
    https://dwarsliggers.leestipper.nl/dwarsliggers/trefwoord/gezin/

    Thanks you very much for your help,
    Plimfec

    Hello,

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

    Thank you.

    Hello,

    Thank you for that information.

    I’ve further investigated your staging site, and it seems that the issue for numbers 1 & 2 is your active theme (2011 child). I’ve activated the default theme (2021), and the categories are showing fine.

    For numbers 3 and 4, I’ve passed it to our development team for further checking and will get back to you.

    We would really appreciate your kind patience regarding this matter.

    Meanwhile, please don’t hesitate to contact us anytime to assist you further with anything else.

    Looking forward to helping you.

    Thank you.

    Hello,

    Looking at the current state of the website for the first two issues the page has exactly the same breadcrumbs on them. The ones from Rank Math match the ones from WooCommerce at the top of the page.

    Check the screenshots in the sensitive data section.

    As for the other issues:

    3. We can’t see any breadcrumbs on this page at all, please make sure that you include them for us to check the settings.

    4. The translation for this comes directly from the translation files of the plugin ad they are only applied on your website if the website is in the appropriate language that you want to be translated.

    In this case, if you switch the language to Dutch on your WordPress installation the plugin would download the translation files for that language and you can then edit those files directly from wp-content/languages/plugins.

    Hope this helps clarify some of your doubts and solve some of the issues.

    Don’t hesitate to get in touch if you require any further assistance.

    Hi Reinelle & Miguel,

    Thanks a lot both for your attention to my issues.

    Miguel is right: at this moment the breadcrumbs of Rank Math and Woocommerce match each other on my staging site. That’s because Reinelle’s comments helped me to figure out what the problem was. I was able to fix the error, which is why problems (1) and (2) no longer exist on the staging site.

    Problem was:
    I used a filter in my child theme’s functions.php to alphabetize categories, in the div.product_meta on single product pages, and that filter was apparently causing the problems. After removing the filter from my functions.php, Rank Math does indeed show both main and child categories in the breadcrumbs.

    So problems (1) and (2) are solved now, very happy with it.

    As for (4), I’ll get started with the language files. It’ll be fine. Thank you for pointing me in that direction.

    Regarding (3):

    There are Rank Math breadcrumbs displayed on that search results page (see the screenshot I just added in the sensitive data section). But they only show Home, which is confusing. I’d like to see something like Home › Zoekresultaten voor ‘deze’.

    I assume the exact translation can be done via the language file again, but how to force Rank Math to display a second term after ‘home’?

    Thanks again,
    Plimfec

    Hello,

    The breadcrumbs from our plugin don’t work properly with a modified search function and only display correctly when you use the default search functions from WordPress.

    On your website, you are passing another value which is the specific post type you are searching and that causes the issue here. If you remove the post type from the search query you’ll see that the breadcrumbs display properly.

    Check the sensitive data section for the URL.

    Hope this helps clarify your doubts.

    Don’t hesitate to get in touch if you have any other questions.

    Hi Miguel,

    Apologies for the delayed reply.

    That’s right, on my website I use the search engine provided by WooCommerce instead of the native WordPress search engine.

    My website revolves around books, so my visitors search for products and not for posts or pages. Mixing all types of search results together would make the search results unnecessarily cluttered. In addition, in terms of usability, it is nice to have the search results displayed in the product template and not in the general WordPress search results template.

    Is there a way to make the Rank Math breadcrumbs also work with the default WooCommerce search engine?

    See the top left corner on my staging website, where I added the default (unedited) search widget provided by WooCommerce.

    Thanks very much,
    Plimfec

    Hello,

    Unfortunately, there’s no way with the current way we set up the breadcrumbs for search results to make this work with custom search implementations such as the one from WooCommerce.

    To do this we would require to change the implementation from using get_search_query() to a custom filter with pre_get_posts and that would also break the current implementation.

    Hope this helps clarify your doubts.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

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

    Thank you.

    Hi Miguel,

    That’s somewhat inconvenient, hopefully it will work sometime in the future.

    WooCommerce itself doesn’t provide breadcrumbs on the first page of the search results either, but does on page 2 and beyond. Like Rank Math: see url to page 2 in the sensitive data section for that.

    My solution might be to manually add breadcrumbs on that first page of the search results. I found some code that I can use for that.

    In functions.php:

    // Manually adding breadcrumbs to search results
    function get_breadcrumb() {
    echo '<a href="'.home_url().'">Home</a>';
    if (is_search()) {
    echo "  ›  Zoekresultaten voor ";
    echo "'";
    echo the_search_query();
    echo "'";
    }
    }

    Calling the function in the template file:

    <div class="breadcrumb"><?php // get_breadcrumb(); ?></div>

    Source: https://www.codexworld.com/wordpress-how-to-display-breadcrumb-without-plugin/

    Thanks a lot for your help and information, Miguel! I think we can mark this thread as resolved.

    Plimfec

    The right call for the breadcrumbs in the template file:

    <div class="breadcrumb"><?php get_breadcrumb(); ?></div>

    I forgot to remove the double slash.

    Hello,

    We appreciate all the feedback and you going the extra mile to share solutions you found for some of your issues.

    If that solution for the breadcrumbs, although cumbersome works for your use case, then we are happy about that, even though it was not possible to use Rank Math for that.

    Rest assured that all these coding-related tickets are also reviewed by the dev team and we are always on the lookout for improvements in our plugin, so we’ll take all the feedback you gave into consideration.

    In case you have any other questions or require any further assistance don’t hesitate to let us know.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘No categories in breadcrumbs – Errors in Google Search Console’ is closed to new replies.