Title: php code to add in custom place
Last modified: February 17, 2020

---

# php code to add in custom place

 *  Resolved [manassar](https://wordpress.org/support/users/manassar/)
 * (@manassar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/)
 * Hello,
 * i want add rating to home page and in custom place in single post, and reviews
   with the form…
    and can i make the review from 10 not 5 ?
 * thank you

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/#post-12446902)
 * 1. Use the [do_shortcode](http://developer.wordpress.org/reference/functions/do_shortcode/)
   function to use the shortcodes in your code.
 * For example:
 *     ```
       <?php
   
       echo do_shortcode('[site_reviews pagination=true assigned_to=post_id]');
       ```
   
 * 2. Please see:
 * [https://wordpress.org/support/topic/score-count-up-to-10-instead-of-5/#post-12266247](https://wordpress.org/support/topic/score-count-up-to-10-instead-of-5/#post-12266247)
   
   [https://wordpress.org/support/topic/score-count-up-to-10-instead-of-5/#post-12358027](https://wordpress.org/support/topic/score-count-up-to-10-instead-of-5/#post-12358027)
    -  This reply was modified 6 years, 8 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
 *  Thread Starter [manassar](https://wordpress.org/support/users/manassar/)
 * (@manassar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/#post-12447094)
 * thank you for reply, but when i use this code i get “There are no reviews yet.
   Be the first one to write one.”
 * can you help me with code for stars, and code for reviews numbers, and code for
   rating?
 * thank you
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/#post-12447100)
 * Please read the Site Reviews > Help > Shortcodes page. This page shows each of
   the three available Shortcodes and explains all of the available options.
 *  Thread Starter [manassar](https://wordpress.org/support/users/manassar/)
 * (@manassar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/#post-12447794)
 * Thank you very much,
 * but i when i use
    <?php echo do_shortcode(‘[site_reviews_summary assigned_to=”
   post_id” hide=”bars,rating,summary”]’);
 * to get rating score, i get a lot of html codes, i need only the score number.
 * thank you
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/#post-12448085)
 * All the shortcodes generate HTML.
 * If you only want the average rating of the summary as a number, you can do this
   in your PHP code:
 *     ```
       $averageRating = do_shortcode('[site_reviews_summary assigned_to=post_id hide=bars,summary,stars]');
   
       echo trim(strip_tags($averageRating));
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 The topic ‘php code to add in custom place’ is closed to new replies.

 * ![](https://ps.w.org/site-reviews/assets/icon-256x256.gif?rev=3307009)
 * [Site Reviews](https://wordpress.org/plugins/site-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/site-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/site-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/site-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/site-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/site-reviews/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/php-code-to-add-in-custom-place/#post-12448085)
 * Status: resolved