Author Topic: How to add structured data / schema / star rating to an OSclass powered website  (Read 644 times)


  • Newbie
  • *
  • Posts: 1
I won't go into the details of the benefits of structured data / schema markup. If you want to succeed in SEO then you need all the help you can get / ranking factors in your favor, structured data being one.
This tutorial is tested and confirmed using Google's Structured Data testing tool and is what I use on my website 360occasions

First, you need to install the OSclass rating plugin at
after that, from your File manager in cpanel, navigate to oc-content/plugins/voting/
Edit view_votes.php and add the following code at the bottom then save

Code: [Select]
<script type="application/ld+json">
{ "@context": "",
  "@type": "Service",
  "name": "<?php echo osc_item_title(); ?>",
  "areaServed": "<?php echo osc_item_city().", ".osc_item_country(); ?>",
  "provider": "<?php echo osc_item_contact_name(); ?>",
  "description": "<?php echo osc_item_description();?>"
  <?php if ($vote['total']>1) {?>,
    {"@type": "AggregateRating",
    "bestRating": "5",
    "worstRating": "1",
     "ratingValue": "<?php echo $vote['vote'];?>",
     "reviewCount": "<?php echo $vote['total'];?>"
    <?php ?>


  • Newbie
  • *
  • Posts: 12
  • Ajit Sahane
Hi, first we can add custom php js code for add schema but now, we think proper way, so i am recommended, everyone SEO PRO  plugin from developed by dis.

this plugin also you can download from the osclass market -

just enable Tags setting page schema option, your item page auto inserted Facebook,Twitter or Google plus markup code.

Really we appreciate this plugin developer work. I am implemented on my website and its help to increase my SEO rank.

You can visit my MASSAGESPAINDIA website.