Forum Moderators: open
<a itemprop="url" href="[LINK TO CLASSIFIED LISTING]">
<b itemprop="name">[TITLE]</b>
</a>
<div itemscope itemtype="http://schema.org/ItemList">
<span itemprop="numberOfItems">315</span>
<!-- first item -->
<div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<meta itemprop="position" content="1">
<link itemprop="url" content="[LINK TO PRODUCT]">
<div itemprop="item" itemscope itemtype="http://schema.org/Product">
<img src="[LINK TO IMAGE]" itemprop="image">
<a itemprop="url" href="[LINK TO PRODUCT]">
<span itemprop="name">[TITLE]</span>
</a>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">[PRICE]</span>
</div>
<p>
<a itemprop="url" href="[LINK TO PRODUCT]">
<b itemprop="name">[TITLE]</b>
</a>
</p>
<p itemprop="description">
[DESCRIPTION]
</p>
</div>
</div>
<!-- second item -->
<div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<meta itemprop="position" content="2">
...
</div>
</div> @type Product
@id [shows the link to current page + the ID for the field, no idea why]
url [LINK TO PRODUCT]
name [TITLE]
description [DESCRIPTION]
offers
@type Offer
priceCurrency USD
price 100.00
[THIS IS THE UNEXPECTED WARNING]
warning - url The url field is recommended. Please provide a value if available.
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">[PRICE]</span>
</div>
<p itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<a itemprop="url" href="[LINK TO PRODUCT]">
<b itemprop="name">[TITLE]</b>
</a>
</p>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"url": "http://www.example.com",
"name": "Unlimited Ball Bearings Corp.",
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+1-401-555-1212",
"contactType": "Customer service"
}
}
</script>
how do you do that when all of the content is user-generated? And how do you link the JSON script with the PHP page?