Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WooCommerce Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
WooCommerce Cookbook

WooCommerce Cookbook

By : Rauland
3.4 (12)
close
close
WooCommerce Cookbook

WooCommerce Cookbook

3.4 (12)
By: Rauland

Overview of this book

If you have ever built or managed a WordPress site and want to add e-commerce functionality into your site, WooCommerce and this book are perfect for you. Learning how to use WooCommerce through this series of recipes will give you a solid platform to add any future e-commerce needs.
Table of Contents (12 chapters)
close
close
11
Index

Displaying positive reviews in the product description

If you do have brand evangelists praising your products, you should make sure their reviews are visible. If you have products that are hard to justify, some social affirmation that other people enjoy the product will be a huge benefit. If that's the case, you might want to highlight a product review in the product description to make sure every user sees it.

Getting ready

You need to have a product with at least one review in your store.

How to do it...

There aren't any plugins that do this. We'll have to custom-code this by ourselves. Unlike many of the code snippets I've shared, this one is a bit lengthier and is broken up into several pieces. Let's take a look at the following steps:

  1. Open up your theme's functions.php file or a custom WooCommerce plugin.
  2. The first step is to tell WordPress to run a custom function at a specific point on the product page. At the bottom of the file, add the following code:
    add_action...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete