How to set breadcrumbs for an article in schema.org?

Member

by hanna , in category: SEO , 6 months ago

How to set breadcrumbs for an article in schema.org?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by julio , 6 months ago

@hanna 

To set breadcrumbs for an article using schema.org, follow these steps:

  1. Include the necessary libraries: Add the schema.org markup language using the JSON-LD format in the head section of your HTML document. Ensure you have included the library by adding the following line of code:
1
2
3
4
5
6
7
<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    ...
  }
</script>


  1. Define the breadcrumb list: Create a breadcrumb list using the BreadcrumbList type from schema.org. This list will contain each step of the breadcrumb.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://example.com/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Category",
        "item": "https://example.com/category"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Article Name",
        "item": "https://example.com/category/article"
      }
    ]
  }
</script>


  1. Set the breadcrumb on the article page: Locate the article page where you want to add the breadcrumbs and include the BreadcrumbList in the WebPage or Article markup.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "WebPage",
    ...
    "breadcrumb": {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://example.com/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Category",
          "item": "https://example.com/category"
        },
    ...
  }
</script>


By following these steps, you can set up breadcrumbs for an article using schema.org. Make sure to replace the example URLs and names with the appropriate ones for your website.