Post Feed Slide Sort By Custom Field, WooCoomerce Example

We’ve had a few requests from users to be able to sort the Post Feed slides by custom fields.

We’ll demonstrate how to do this, but if you’re not yet familiar with Post Feeds head of here first:

Post Feed Slides

Then follow these steps (assuming you already have products with featured images):

1. Create a new slideshow and add a Post Feed slide

Post Feed Products

2. Select ‘Products’ in the ‘Post Types’ tab

Post Feed Desc

3. Select ‘DESC’ from the second ‘Order by’ field in the ‘Display Settings’ tab. Leave the first field, this is what we’ll be overriding.

4. Make any other changes, such as increasing the Post Limit – the default is 3.

5. Add the following code to your theme’s functions.php file:

6. Change ‘1234’ to the ID of the slide you wish to apply the order to, you can do this by hovering over delete icon for the individual slide e.g. slide_id=1234 below

yoursite.com/wp-admin/admin-post.php?action=metaslider_delete_slide&slider_id=0000&slide_id=1234

If you then refresh the page where you have placed the slider you should see that the order has now been changed.

Want to use another custom field?

If you have an alternative custom field you want to use then just replace the ‘your_custom_field’ meta_key value with the custom field of your choice.

 

 

No related content found.