Add the review widget on WordPress and WooCommerce

Last updated

On WooCommerce, the Formgong plugin puts each product's reviews on its product page for you. On any other WordPress site, paste the widget into a Custom HTML block.

WooCommerce: the Formgong plugin

  1. In WordPress open Plugins, Add New, search for “Formgong”, click Install Now, then Activate.
  2. In Formgong, open Reviews, add your shop as a review site and copy its key: the fk_… value in the code on the Widget tab, step Add to site.
  3. In WordPress open Settings → Formgong. Under Product reviews, paste the key and turn on Show Formgong reviews on product pages. Saving checks the key and says how many approved reviews it has.
  4. Choose whether Formgong replaces the WooCommerce Reviews tab or sits next to it in its own tab, and save.
  5. Open a product page and look for the star average, the approved reviews and the Write a review link.

See it live: Glyna is a demo WooCommerce store connected to Formgong. Open a product, such as the Morning Mug, and its Reviews tab: that is the plugin's widget, with data-product="11", the product's ID.

The plugin sets data-product to the WooCommerce product ID, so each product shows its own reviews and new reviews from its page land on it. [formgong_reviews] places the reviews anywhere, and [formgong_reviews layout="carousel"] shows a carousel. The plugin also adds stars to product lists, a rating badge and the rating in WooCommerce's Product structured data; see Formgong on WooCommerce.

Any WordPress page: a Custom HTML block

  1. In Formgong, open Reviews, pick your site, open the Widget tab, go to step Add to site and press Copy. No review site yet? Get started first.
  2. Open the page in the block editor.
  3. Click the Block Inserter icon and add a Custom HTML block, or type /html in a new paragraph and press Enter.
  4. Click Edit HTML, paste the code and press Update.
  5. Save or publish the page and open it.

Common problems

The reviews do not show on product pages

Check that WooCommerce is active, the key is saved and Show Formgong reviews on product pages is on. In a block theme whose product template has no Reviews tab, add a Shortcode block with [formgong_reviews] to the template.

The script disappears from the Custom HTML block

WordPress removes <script> from blocks saved by users without the unfiltered_html capability, such as Contributors. Ask an administrator to add the block.

Imported reviews do not appear under their product

On WooCommerce the product is the WooCommerce product ID. Put it in the product column of your file. For reviews stored in WooCommerce itself, Settings → Formgong → Download WooCommerce reviews (CSV) gives a file with that column filled; see Import and export reviews.

Only the “Write a review” link shows

The widget shows reviews only after you approve them. Open the site's Reviews tab and approve the ones under Waiting. On a product page, the product also needs approved reviews of its own.

Sources: WordPress.org: Custom HTML block, Formgong in the WordPress plugin directory.

Questions: support@formgong.com.