So Google has depreacted data-vocabulary.org and some of us are getting warnings from Google. To that end; any Schema.org microdata experts care pick out problems with this code before I implement same?
In navbar_link
PHP Code:
<vb:if condition="$show['breadcrumb']">
<li class="navbit"><a href="{vb:raw nav_url}">{vb:raw nav_title}</a></li>
<vb:else />
<li class="navbit lastnavbit"><span>{vb:raw nav_title}</span></li>
</vb:if>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement":
[
{
"@type": "ListItem",
"position": "{vb:raw breadcounter}",
"item":
{
"url": "https://www.yourforumurl.com/{vb:raw nav_url}",
"name": "{vb:raw vboptions.bbtitle} | {vb:raw nav_title}"
}
}
]
}
</script>
As you can see I am leaving the default VB code in there as the styling is fine for me and Google prefers json for this application anyway.
*Edit: Added this plugin
https://vborg.vbsupport.ru/showthread.php?t=323652 to take care of the static counter.
Hook Location: navbits
Plugin PHP Code:
PHP Code:
$breadcounter = $counter;
vB_Template::preRegister('navbar_link', array('breadcounter' => $breadcounter));
Then add {vb:raw breadcounter} into the navbar_link template.