Support » Plugin: Site Reviews » Add Review Form to Theme?

  • Resolved chitown

    (@chitown)


    I have a CPT of 2,000 products that I want to add the ability for users to add reviews per product.

    I used the following in my theme:
    <?php echo do_shortcode("[site_reviews_form assigned_posts='post_id']"); ?>

    I had thought this would show the review form on the front-end for every product, but it does not. If I add a review to one of my products in the back-end, the form then does show with the php snippet I pasted above.

    My question: How can I get the review form to show on my product post views without adding reviews to that product initially? I want user to see the review form on the product page and be the first people to add reviews for that product.

    Possible? Or am I trying to use the plugin incorrectly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    If using do_shortcode does not work, then you are pasting it in the wrong place of your theme template file.

    You can perform a test by adding this to your theme’s template file:

    <?= 'Display the review form here'; ?>

    If you see “Display the review form here” in the expected place on your page when you reload the page, then that is where you should use the do_shortcode function.

    Alternatively, if you are using Woocommerce for your products, you can use the “Woocommerce Reviews” add-on to integrate Site Reviews.

    Thread Starter chitown

    (@chitown)

    Now I am embarrassed. I swear I confirmed template spot with basic HTML before posting this question.

    Works now!

    I apologize for wasting your time.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Review Form to Theme?’ is closed to new replies.