• Resolved ash6789

    (@ash6789)


    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

    (@geminilabs)

    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 6 years, 6 months ago by Gemini Labs.
    • This reply was modified 6 years, 6 months ago by Gemini Labs.
    • This reply was modified 6 years, 6 months ago by Gemini Labs.
    Thread Starter ash6789

    (@ash6789)

    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.