wordpressrich-snippets

Rich Snippet coding Wordpress without plugin


I'd wish to add some Rich Snippets to my Wordpress website. Where can I find the right documentation on this subject? I need to implement the Rich Snippet without an existing Wordpress plugin. I can develop my own if necessary.

I do know PHP, HTML and CSS.


Solution

  • Rich snippet is generated by Search Engines by picking up your microdata schema you would have implemented in your theme.

    You need to edit your theme, and implement any Schema you want to implement. If it is for example a product. You need to follow this schema https://schema.org/Product

        <div itemscope itemtype="http://schema.org/Product">
      <img itemprop="image" src="dell-30in-lcd.jpg" alt="A Dell UltraSharp monitor"/>
      <span itemprop="name">Dell UltraSharp 30" LCD Monitor</span>
      <div itemprop="aggregateRating"
        itemscope itemtype="http://schema.org/AggregateRating">
        <span itemprop="ratingValue">87</span>
        out of <span itemprop="bestRating">100</span>
        based on <span itemprop="ratingCount">24</span> user ratings
      </div>
      <div itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer">
        <span itemprop="lowPrice">$1250</span>
        to <span itemprop="highPrice">$1495</span>
        from <span itemprop="offerCount">8</span> sellers
        Sellers:
        <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
            <a itemprop="url" href="save-a-lot-monitors.com/dell-30.html">
            Save A Lot Monitors - $1250</a>
        </div>
        <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
            <a itemprop="url" href="jondoe-gadgets.com/dell-30.html">
            Jon Doe's Gadgets - $1350</a>
        </div>
      </div>
      ...
    </div>
    

    Using schema template in html, you can incorporate it into your theme, and populate your pages with dynamic content.

    Please ask specific question about rich snippet or specific Schema if above information does not help you.

    Added after your comment about Company/Organization

    For that I recommend same approach but following schema as per https://schema.org/Organization

        <div itemscope itemtype="http://schema.org/Organization">
      <span itemprop="name">Google.org (GOOG)</span>
    Contact Details:
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        Main address:
          <span itemprop="streetAddress">38 avenue de l'Opera</span>
          <span itemprop="postalCode">F-75002</span>
          <span itemprop="addressLocality">Paris, France</span>
        ,
      </div>
        Tel:<span itemprop="telephone">( 33 1) 42 68 53 00 </span>,
        Fax:<span itemprop="faxNumber">( 33 1) 42 68 53 01 </span>,
        E-mail: <span itemprop="email">secretariat(at)google.org</span>
    Members:
    - National Scientific Members in 100 countries and territories: Country1, Country2, ...
    - Scientific Union Members, 30 organizations listed in this Yearbook:
      <span itemprop="member" itemscope itemtype="http://schema.org/Organization">
        Member1
      </span>,
      <span itemprop="member" itemscope itemtype="http://schema.org/Organization">
        Member2
      </span>,
    History:
    </div>