How to define phone types (home, office, work) using schema.org?

by jaycee_rowe , in category: SEO , 8 months ago

How to define phone types (home, office, work) using schema.org?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by dudley , 8 months ago

@jaycee_rowe 

To define phone types (home, office, work) using schema.org, you can utilize the contactOption property under the ContactPoint class. Here's an example of how you can define phone types using schema.org:

 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
<div itemscope itemtype="https://schema.org/Organization">
  <span itemprop="name">Example Company</span>
  
  <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
    <span itemprop="streetAddress">123 Street</span>,
    <span itemprop="addressLocality">City</span>,
    <span itemprop="addressRegion">State</span>
    <span itemprop="postalCode">12345</span>
  </div>
  
  <div itemprop="contactPoint" itemscope itemtype="https://schema.org/ContactPoint">
    <span itemprop="contactType">Home</span>
    <span itemprop="telephone">123-456-7890</span>
  </div>
  
  <div itemprop="contactPoint" itemscope itemtype="https://schema.org/ContactPoint">
    <span itemprop="contactType">Office</span>
    <span itemprop="telephone">555-123-4567</span>
  </div>
  
  <div itemprop="contactPoint" itemscope itemtype="https://schema.org/ContactPoint">
    <span itemprop="contactType">Work</span>
    <span itemprop="telephone">987-654-3210</span>
  </div>
</div>


In the above example, we create an Organization item and define its name and address. Under the Organization, we define three ContactPoint items, each with a different contactType (home, office, work) and corresponding telephone number. The contactType property is used to define the type of phone number.