There was a problem loading the comments.

SHOP - Change the Order of Featured Product Listings

Support Portal  »  Knowledgebase  »  Viewing Article


Featured Products

If you make products "featured", WooCommerce has an option for you to display those featured products on your site. The featured products visibility is set using what is called "short code". This is quite common for WordPress and is a purposeful design as it gives the user a lot of control. However, it may seem a bit daunting until you are familiar with it. 

NOTE: this document assumes you already have a list of featured products on your site and simply want to change the order of those products. 

To rearrange the order of featured products:

1. Go to Pages -> All Pages


2. Hover over the page that has the featured products on them and then click on the "Yootheme Builder" 

NOTICE: any time a page has that option you need to use it, or the page will break!


3. Look on the left-hand side for a section called "Featured" and then click on the block labeled "Html":


The short code that is on that page probably looks something like this:
[products visibility="featured"]

By default, products are arranged by the product title. To change that, we need to add parameters to the short code. The parameter we need to add is called, "orderby":

orderby – Sorts the products displayed by the entered option. One or more options can be passed by adding both slugs with a space between them. Available options are:

  • date – The date the product was published.
  • id – The post ID of the product.
  • menu_order – The Menu Order, if set (lower numbers display first).
  • popularity – The number of purchases.
  • rand – Randomly order the products on page load (may not work with sites that use caching, as it could save a specific order).
  • rating – The average product rating.
  • title – The product title. This is the default orderby mode.

If we want to change the featured products to display in a random order, so it changes every time someone comes to the page, we will edit the short code to look like this:

[products visibility="featured" orderby="rand"]

4. Once you change the short code, you need to save it by pressing the "Save Layout" button at the top:


5. Click the "X" at the top left to exit Yootheme Builder

LINK: to see all the options for the short codes, check out THIS DOCUMENT by WooCommerce.

Share via

Related Articles

Self-Hosted Help Desk Software by SupportPal