Sorting of Listed Products

Currently shortcode only display list of product showing latest at the first. But now you can list the product the way you want.

Just you need to add orderby parameter to the shortcode.

To display product randomly
odudes-all-products perrow=2 perpage=10 ptype=electronic orderby=rand

To display product ordered by Title
odudes-all-products perrow=2 perpage=10 ptype=electronic orderby=title

You can do more.

  • none‘ – No order
  • ID‘ – Order by post id. Note the capitalization.
  • author‘ – Order by author.
  • title‘ – Order by title.
  • name‘ – Order by post name (post slug).
  • date‘ – Order by date.
  • modified‘ – Order by last modified date.
  • rand‘ – Random order.
  • comment_count‘ – Order by number of comments (available since Version 2.9).

 

Leave a Reply

Your email address will not be published. Required fields are marked *