Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Paul

    (@pryley)

    First, here is a quick primer on how shortcodes work in WordPress.

    Every shortcode is wrapped in two square brackets [ ].

    For example, the Site Reviews shortcode to display the review form is:

    [site_reviews_form]

    Shortcode options change the output of the shortcode.

    For example, to hide the name and email fields in the review form, you add the “hide” option in the shortcode like this:

    [site_reviews_form hide="name,email"]

    You can add multiple options to a shortcode.

    For example, to hide the name and email fields in the review form AND assign submitted reviews to the current page, you add the “hide” and “assigned_posts” options to the shortcode like this:

    [site_reviews_form hide="name,email" assigned_posts="post_id"]

    Now that I have explained how shortcodes work, I will try to answer your questions. Please read my answers carefully.

    I am using short code in WordPress classic editor. Site Reviews says to use this: <code>[site_reviews_form assigned_posts=”post_id”]</code>

    So I tried it using “post_id”.
    Then I tried it using the actual product/post id. It doesn’t matter. It publishes to all pages that I’ve added the Site Reviews code to. What am I doing wrong? Thank you.

    Here is what to do step by step.

    Step 1: To make this easier for you to understand, first go to the “Site Reviews > Settings > Reviews” page and enable the “Enable Assigned Links” option.

    Step 2: Now go to your product pages and add this shortcode: [site_reviews]. Note that I have not added any options to the shortcode at the moment! I haven’t added options because I want you to understand how review assignment works.

    If you correctly did steps 1 and 2, then you should see ALL of your reviews on both of your product pages. You should also notice that some of the reviews have a link to their assigned product page.

    When you submitted a review in the review form, it was assigned to the current page. It did this because you added the assigned_posts="post_id" option to the review form shortcode.

    Step 3: Now that you have confirmed that review assignment is working, here is how to only display reviews that have been assigned to the current page.

    In step 2 you added the [site_reviews] shortcode and this this displayed ALL of the reviews. Now we are going to add the assigned_posts=”post_id” option to the shortcode. This will tell Site Reviews to only display reviews that have been assigned to the current page.

    Like this:

    [site_reviews assigned_posts="post_id"]

    And that is how review assignment works!

    This is the code I am using to have the reviews appear: [site_review class=”single-review full-width”]

    This seemed to be the only code that worked.

    Finally, let me explain this:

    [site_review] This shortcode displays a single review.
    [site_reviews] This shortcode displays multiple reviews.

    Do you see the difference in the shortcodes?

    Thread Starter websitende

    (@websitende)

    Thank you. This works, and thank you for your careful instruction. So at first I thought it didn’t work. But I had to edit the other product page as well, or the review showed up there, too. Now, it seems to me that I could therefore do that original code so that I could have a page that showed all reviews–they’d appear on the original page and on a page I created for all reviews. Is that correct?

    I do have another question: On the page on which I wrote the review, Site Reviews includes the following after the date:

    Review of Satic International Super Duty Filter for 240-Volt (220/230-Volt) Power

    Is there a way to not have it do that?

    Here is the code I used that works as you outlined–just so it’s here for me and for anyone else who might need it.

    Following the review form immediately below are the reviews for this filter. To read the reviews, just scroll past the review form. Please also see the many reviews on the separate Reviews page.

    ____________________________________________________________ Write a Review

    [site_reviews_form assigned_posts="post_id"]

    ____________________________________________________________ Reviews

    [site_reviews assigned_posts=”post_id”]

    • This reply was modified 1 year, 1 month ago by websitende. Reason: figured something out
    Plugin Contributor Paul

    (@pryley)

    Now, it seems to me that I could therefore do that original code so that I could have a page that showed all reviews–they’d appear on the original page and on a page I created for all reviews. Is that correct?

    Yes, that is correct.

    If DO you use the “assigned_posts” option on the shortcode, Site Reviews will ONLY display reviews that have already been assigned to the current page. For example:

    [site_reviews assigned_posts="post_id"]

    If you DO NOT use the “assigned_posts” option on the shortcode, then Site Review will display all of the reviews because you are not limiting it to only those assigned to the current page. For example:

    [site_reviews]

    Review of Satic International Super Duty Filter for 240-Volt (220/230-Volt) Power

    Site Reviews will add this to the review if you have enabled the “Enable Assigned Links” option in the settings (see step 1 my previous reply).

    Displaying a link to the product in your review is useful when you are displaying all reviews for all products on a single page.

    If you want to display a link to the product in each review on your main reviews page, BUT don’t want to display this link in reviews displayed on your product pages, this is what to do:

    Step 1: Edit your product pages.

    Step 2: Add the “hide” option to your existing [site_reviews] shortcodes like this:

    [site_reviews assigned_posts="post_id" hide="assigned_links"]

    Plugin Contributor Paul

    (@pryley)

    And finally, please take some time to read carefully the shortcode documentation on the Site Reviews > Help & Support > Shortcodes page.

    Every single option for every Site Reviews shortcode is explained on that page. Now that you understand how shortcode options work in WordPress, it should be a lot easier to understand the documentation if you read it slowly and carefully!

    Plugin Contributor Paul

    (@pryley)

    And one last thing before I mark this as resolved:

    I noticed that you are using WooCommerce. Did you know that WooCommerce has reviews built in for your products? If you go to the WooCommerce Settings and click on the Products tab, you can enable WooCommerce reviews for your products.

    I mention this because Site Reviews provides an integration with WooCommerce. Everything that you have been trying to do can be done automatically!

    1. Enable product reviews in the WooCommerce settings.
    2. Enable the Woocommerce integration in the “Site Reviews > Settings > Integrations”

    Normally that’s all you have to do to add Site Reviews to product pages in WooCommerce.

    Thread Starter websitende

    (@websitende)

    Doesn’t work. It posts on ALL pages.

    Here’s my code:

    <strong>________________________________________________________________________</strong>

    <h2 style="color: #0000ff; text-align: center;">Write a Review</h2>

    <code>[site_reviews_form assigned_posts="post_id"]</code>

    <strong>________________________________________________________________________</strong>

    <h2 style="color: #0000ff; text-align: center;">Reviews</h2>

    [site_review class="single-review full-width"]

    It is supposed to appear here. https://nodirtyelectricity.com/product/standard-power-perfect-filter-gen-iii/

    It’s appearing on random pages. In fact, think all pages. This is awful. Also, with regard to integrating with Woo first I don’t see where to do that and second, Woo requires people to sign in and few people want to do that. When I disable the verfied post thing, it doesn’t disable a darn thing and I see I am not the only one who has problems with that.


    https://nodirtyelectricity.com/product/solar-power-perfect-filter-gen-ii-satic/

    https://nodirtyelectricity.com/product/solar-power-perfect-gen-iii/

    https://nodirtyelectricity.com/product/power-perfect-filter-gen-ii/

    https://nodirtyelectricity.com/product/heavy-duty-power-perfect-filter-gen-iii/

    https://nodirtyelectricity.com/product/satic-pure-power-plug-in-filter-single/

    Thread Starter websitende

    (@websitende)

    Doesn’t matter what code I use. It appears on all pages.

    I changed it to this. Still appears on all pages. [site_reviews assigned_posts=”post_id”]

    <strong>Following the review form immediately below are the reviews for this filter. To read the reviews, just scroll past the review form. Please also see the many reviews on the separate <a href="https://nodirtyelectricity.com/testimonials/" target="_blank" rel="noopener">Reviews</a> page.</strong>

    <strong>________________________________________________________________________</strong>

    <h2 style="color: #0000ff; text-align: center;">Write a Review</h2>

    <code>[site_reviews_form assigned_posts="post_id"]</code>

    <strong>________________________________________________________________________</strong>

    <h2 style="color: #0000ff; text-align: center;">Reviews</h2>

    [site_reviews assigned_posts=”post_id”]
    Plugin Contributor Paul

    (@pryley)

    It’s appearing on random pages. In fact, think all pages. This is awful.

    Sigh. I have really tried hard to explain this to you, maybe I’m just not good at it.

    Let’s break this down again…page by page.

    https://nodirtyelectricity.com/product/standard-power-perfect-filter-gen-iii/

    On this page you are using the [site_reviews] shortcode with NO options.

    However, you said that you also tried [site_reviews assigned_posts=”post_id”] which did not work. In that case, the reason it is not working is because you are using styled/curly quotes instead of plaintext quotes ". Shortcodes options do not work if you use styled/curly quotes . You have to use plaintext quotes " instead.

    This is not Site Reviews fault!!! This is how shortcode options work in WordPress so feel free to blame WordPress.

    https://nodirtyelectricity.com/product/solar-power-perfect-filter-gen-ii-satic/

    On this page you are using the [site_review] shortcode. THIS IS THE WRONG SHORTCODE TO USE. Note the singular word: site_review.

    https://nodirtyelectricity.com/product/solar-power-perfect-gen-iii/

    On this page you are using the [site_review] shortcode. THIS IS THE WRONG SHORTCODE TO USE. Note the singular word: site_review.

    https://nodirtyelectricity.com/product/power-perfect-filter-gen-ii/

    On this page you are using the [site_review] shortcode. THIS IS THE WRONG SHORTCODE TO USE. Note the singular word: site_review.

    https://nodirtyelectricity.com/product/heavy-duty-power-perfect-filter-gen-iii/

    On this page you are using the [site_review] shortcode. THIS IS THE WRONG SHORTCODE TO USE. Note the singular word: site_review.

    https://nodirtyelectricity.com/product/satic-pure-power-plug-in-filter-single/

    On this page you are using the [site_review] shortcode. THIS IS THE WRONG SHORTCODE TO USE. Note the singular word: site_review.

    Please go back and read the instructions I gave you more carefully.

    Also, with regard to integrating with Woo first I don’t see where to do that and second, Woo requires people to sign in and few people want to do that. When I disable the verfied post thing, it doesn’t disable a darn thing and I see I am not the only one who has problems with that.

    1. Did you bother to look in the Site Reviews settings to enable the WooCommerce integration?
    2. Did you bother to check the WooCommerce settings on the Products tab to allow guests to leave reviews?

    You gave a 1-star review and I still tried to help you and be courteous, but you don’t seem to want to read the instructions I provide carefully which makes me wonder if you really want the help or are just looking for a platform to express your displeasure.

    Respectfully, I don’t know that I have the bandwidth anymore to assist you. I would like to suggest you consider looking elsewhere for a reviews plugin, or stick with the review system that comes with WooCommerce.

    • This reply was modified 1 year, 1 month ago by Paul.
    • This reply was modified 1 year, 1 month ago by Yui.
    Thread Starter websitende

    (@websitende)

    Paul, thank you. I have been very ill the last 3 weeks. I had no idea about the curly quotes. I’m going to fix that. Thank you for all your help.

    Thread Starter websitende

    (@websitende)

    It works now. Thank you, Paul!!! I will edit my review.

    Plugin Contributor Paul

    (@pryley)

    Thanks @websitende, I appreciate it!

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

The topic ‘Posts Reviews to All Product Pages’ is closed to new replies.