0

Where should I put breadcrumb markup? On the target page or on the linking page?

For example, if I have the following structure:

Home -BallGames --Baseball --Football -BoardGames --NonGambling ---Chess ---Checkers

Do I place the following code (for breadcrumbs) in, say, chess, checkers, and all the "destination" files or do I have to mark it up in the "linking" files (Home,BoardGames, and NonGambling)

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "item": {
        "@id": "http://example.com",
        "name": "Home"
      }
    },
    {
      "@type": "ListItem",
      "position": 2,
      "item": {
        "@id": "http://example.com/BoardGames",
        "name": "BallGames"
      }
    },
    {
      "@type": "ListItem",
      "position": 3,
      "item": {
        "@id": "http://example.com/BoardGames/NoGambling",
        "name": "NonGambling"
      }
    },
    {
      "@type": "ListItem",
      "position": 4,
      "item": {
        "@id": "http://example.com/BoardGames/NoGambling/chess"
        "name": "chess"
      }
    }
  ]
}
</script>
  • Just to be clear, I am not sure you are getting what breadcrumbs are, so I want to clarify and hopefully not insult. Breadcrumbs are links in series that link to pages in the hierarchy path above the page a user is on and not to pages not within the hierarchy. Using your example, the page football would have links to ballgames and home. Traditionally, the last element would not be a link at all, but the page the user is on. Your breadcrumb code should reflect this hierarchy. Cheers!! – closetnoc Dec 14 '16 at 1:52
1

If you're looking to implement location-based Breadcrumbs (those that reflect the site's folder/page structure) then this particular code-block you've supplied would be on the chess page itself.

You wouldn't be able to reference the chess page in the breadcrumbs of the parent NoGambling page, since there are other alternative(s) (checkers in this case) - Note, the NoGambling page should also contain their relevant schema breadcrumb markup, along with all the other pages.

It's recommended to omit the hyperlink on the last item (the current page), testing using Google's Structured Data tool without the @id value in the last list item works fine.

P.S. there's a missing , in your example at the end of the 4th @id.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.