<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": "<?php the_title(); ?>",
"item": "<?php the_permalink(); ?>"
}
]
}
I am using this code for dynamic Breadcrumb schema but it work only first level pages and default post , i need to work all custom post type and custom taxonomy. can you please help me?
2
Answers
try this script