Support » Theme: OnePress » How to remove Onepress empty breadcrumbs?

  • The problem is that Onepress has a breadcrumbs container but no breadcrumb list items in it. Google objects to this when submitting structured snippets.

    I see that an update to Onepress (GitHub) added a way to disable the Onepress breadcrumbs, but I can’t find it. I know that a plug-in can be added, but I’m already successfully using Yoast for breadcrumbs so just want to remove the empty breadcrumbs container. I can maybe edit in my child theme, but hoping there is a config option first.


Viewing 6 replies - 1 through 6 (of 6 total)
  • I need to know this as well, got some errors in Google Search console concerning this matter.

    Clarification after some digging. I had used Yoast recommended code, but this is not required for Onepress. You just turn on the breadcrumbs option in Yoast.

    But the Google issue remains. The breadcrumbs are correctly tagged by Yoast, but where the breadcrumbs are actually displayed in the content, Google reports unnamed element. I’m only getting started with, but suspect this is because Onepress includes a vocab tag in the breadcrumbs div. This seems to be redundant.


    Please edit your page, then check the option Hide Breadcrumb.

    If it does not work, please remove the code in the file
    /wp-content/themes/onepress/inc/template-tags.php line 1525-1553

    then clear all the cache and analyze your site with Google Search Console again.

    • This reply was modified 3 months, 2 weeks ago by Long Nguyen.

    Thanks for the fast reply. I believe either of these solutions remove the breadcrumbs altogether. That’s not what I’m after. I want to keep the breadcrumbs and the correct Yoast snippets which tag the breadcrumbs.

    I think I’ve solved it (need to learn more about this whole subject area) by removing the vocab=“” on lines 1538 and 1546 of template-tags.php. Perhaps I can remove the typeof as well. I think these are RDF? But I already have JSON-LD snippets doing the job.

    It cleared the Google error anyway.

    Doesn’t seem to be an easy way to include the modified onepress_breadcrumb function in child theme however. It’s not hooked to an action and is not pluggable.

    Looks like I’ll need to rename the function in the child theme and change where it’s called in all the page and post templates. I may be missing something?

    @longnguyen When removing, is this also the solution?

    Furthermore, could you still answer my answer concerning the frontpage SEO question? Not concerning meta, but my other question.Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.