Title: Shortcode using do_shortcode
Last modified: September 23, 2018

---

# Shortcode using do_shortcode

 *  Resolved [ash6789](https://wordpress.org/support/users/ash6789/)
 * (@ash6789)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-using-do_shortcode/)
 * Hi Guys
 * I am using your plugin the problem I am facing is I used this as below.
 *  <?php echo “post id us:”. $post_id = get_the_ID(); ?>
    <?php echo do_shortcode(‘[
   site_reviews_form title=”Comment” description=”Love this story? Comment and tell
   us how you like this story?” assign_to=”.$post_id.” id=”jmf1tjx9″ hide=”email,
   terms,title”]’); ?> <?php echo do_shortcode(‘[site_reviews title=”Recent Reviews”
   count=”10″ rating=”5″ pagination=”true” assigned_to=”.$post_id.” schema=”true”
   id=”jmf15s45″]’); ?>
 * Now issue is it is displaying same on all the posts.So How do I differentiate
   id value?
 * or
 * I have to add manually in each posts?

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

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-using-do_shortcode/#post-10715929)
 * Use `assign_to=post_id` instead of entering the actual post ID. This will automagically
   use the post ID of the current page. For example:
 * `<?= do_shortcode('[site_reviews_form title="Comment" description="Comment and
   tell us how you like this story!" assign_to=post_id id=jmf1tjx9 hide=email,terms,
   title]'); ?>`
 * Please make sure to read the shortcode documentation: “Site Reviews > Get Help
   > Documentation > Shortcodes”
    -  This reply was modified 7 years, 8 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
    -  This reply was modified 7 years, 8 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
    -  This reply was modified 7 years, 8 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
 *  Thread Starter [ash6789](https://wordpress.org/support/users/ash6789/)
 * (@ash6789)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-using-do_shortcode/#post-10723519)
 * Thank You So Much guys.It worked.

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

The topic ‘Shortcode using do_shortcode’ 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/)

## Tags

 * [do_shortcode](https://wordpress.org/support/topic-tag/do_shortcode/)

 * 2 replies
 * 2 participants
 * Last reply from: [ash6789](https://wordpress.org/support/users/ash6789/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/shortcode-using-do_shortcode/#post-10723519)
 * Status: resolved