You can sort the slider items as you like by providing order and orderby attributes in the shortcode.
You can use the following values for order attribute
- DESC – Descending order of orderby attribute
- ASC – Ascending order of orderby attribute
You can use the following values for orderby attribute
- date – Sort by post published date
- ID – Sort by post ID
- author – Sort by post author
- title – Sort by post title
- modified – Sort by post modify date
- rand – Random order
- meta_value – If you’re using meta_key attribute for sorting
- meta_value_num – If the meta_key is an integer
If you want to sort your slider items by some custom meta, provide the meta key name using this attribute. Suppose if there is a meta key named purchased_date and you want to sort the items by this, you will use the following attributes in your shortcode
So your shortcode will become
[wcp-carousel id="1609" order="DESC" orderby="meta_value" meta_key="purchased_date"]
Drag Posts Titles to Sort
Since version 13.6, you can drag the post titles and change their orders directly from the selection menu as displayed below.
After setting the order above, you have to set the orderby attribute of the shortcode to post__in as shown in the following example.
[wcp-carousel id="1609" orderby="post__in"]