Black Friday: Up to 40% off all plans!

Offer automatically applied at checkout
Days
Hours
Minutes
Seconds

FAQs

Find answers to common questions and step-by-step solutions.

Glossary

An alphabetical list of terms and their definitions.​

Video Library

Discover our tutorials

This help doc applies to version 4. If you’re using version 5, please refer to the updated documentation here.

Set Item Order to Alphabetical

Contents

The order of feed items in our shortcode and block displays (via the templates) is always in descending order of the date, meaning the latest item is always displayed up top and the oldest item is displayed at the bottom.

The filter below changes this to display the items in alphabetical order instead. Please note that this specific filter will change the order of all the feed items display on your site, no matter the source or the template being used.

add_filter('wpra/feeds/templates/feed_item_collection', 'wpra_sort_feed_items_alpha');

function wpra_sort_feed_items_alpha($collection) {

return $collection->filter([

'order_by' => 'title',

'order' => 'ASC',

]);

}

GIVE FEEDBACK

Was this article helpful?

Still stuck?

Find Your Perfect Plan

Answer a few questions, and we’ll recommend the best option for you!