If get_featured_posts()
returns an array of WP_Post
objects, then yes, the usort()
function you have should work properly.
If you have access to get_featured_posts()
, and it uses get_posts()
or a WP_Query
instance, then you can set the orderby
parameter to menu_order
, and drop the usort()
call.
Related Posts:
- visually sort ordering “custom post types” for end users
- Custom Table Column Sortable by Taxonomy Query
- How do I allow users to sort posts? [duplicate]
- Sorting results from JSON-API on custom fields
- Sort users in get_users() in custom order
- Sort by custom field value
- How to sort posts with the first 2 or 3 by latest, and the rest is random?
- Get “wp_get_nav_menu_items” to sort alphabetically [duplicate]
- Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4
- Adding Sorting to Website?
- Sorting by tag or category
- get_terms orderby name as numbers
- Creating a category page by alphabet
- Sorting get_post_ancestors array
- wordpress custom_meta ordering of timestamps
- Multi-level ordering in WordPress
- Sorting for custom column in WordPress admin post table
- Help alphabetically sorting $terms from get terms(‘wpsc_product_category’
- Vertical alphabetically post columns
- Advanced custom fields sort repeater by date
- Displaying posts sorting by a custom criterion
- Sorting custom post type by usermeta
- Sort posts by meta key that is serialised with other meta keys
- orderby field – list of available options?
- User Query sort on custom field then name
- WP Query sort by meta value
- Best Practices for a Completely Customizable Homepage – without plugins
- Sorting posts by custom field value
- How do I create a sort capability by Title, Category, Author, Date?
- How to avoid duplicating same meta_value?
- Sorting/Filter posts from front-end in WordPress blog
- ‘sort_column’ => ‘menu_order’ not working
- Sort scheduled posts in ascending order by default
- How to sort by number
- sort items by randomness
- inner foreach loop sorting
- Sortby parameter to sort users
- Update meta_key value for a page
- Sort my event calendar by date
- Table Sorter sort by span title?
- make two custom columns sortables
- How to display remaining post ( in post__in ) if posts are less then post per page?
- ACF pro: Group teaser by datepicker year and display custom sub fields [closed]
- Sorting in WP_List_Table class
- Sort an array with an ACF meta key
- display wordpress user who published a pending post of another user
- Static front page and orderby
- Advanced sorting of content in wordpress [closed]
- Sort posts by first content letter
- Grouping posts starting with same letter
- Getshopped (WP-e-commerce): show all protucts on one admin page for drag-and-drop ordering [closed]
- List CPT by menu_order with children right after parent
- Multidimensional array sort?
- How can users sort multiple pages?
- How do i Sort my Posts
- How to resort my id in wordpress?
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Sort pages in loop by admin’s page attributes order field?
- register_post_type sort order by title by default
- Random sort within an already sorted query
- Sort custom post type list table by display name of a user id stored as post meta value
- Setting Custom Sort Order of Posts within a Category
- Sort plugins by rating
- sortable custom column in media library
- Can I force a metabox to be in one column?
- Sortable admin columns, when data isn’t coming from post_meta
- How to sort terms with diacritical signs?
- Custom taxonomy list and sortby letter pagination problem
- Advanced orderby with multiple meta_query
- How to use WP default post list tables in a plugin?
- Exclude posts with specific meta_value while sorting by a separate meta_value
- How to sort posts in admin by titles with dd.mm.yyyy format?
- WooCommerce product sorting VERY slow
- How to re-order pages en-masse
- Sorting posts by multiple values, combined
- Sort Posts By Category?
- Server-side sorting of posts
- Order By Post Type ThenBy Taxonomy
- Admin table list API?
- How to sort posts based on the value (number) of a post’s metadata?
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- WordPress Comments sort by custom meta key
- Understanding the orderby in WP_Query?
- Native gallery sorting is ignored
- Sort a custom post with ACF: Date Picker & Display Featured!
- Sort Custom Post Type by Category ID then Post Name
- get the headlines of the authors’ last post
- Add a “default sorting” menu to child store pages
- How to sort queried pages by an array of page ids?
- Compare ACF date field (if exists) and post date and order DESC
- WP_Query, Taxonomy, list of attached items to a Term, sorted
- (WP List Table) How to sort by SKU and Custom Fields?
- Customize the Sorting Dropdown in WooCommerce use another list or more page
- WP Query with meta queries
- Woocommerce Category Sort Dropdown
- Using Orderby and meta_value to order natural/alphanumerical
- How use custom upload directories in filesystem and url based on media type or category
- Sorting is not working in WordPress WP_Query
- have_posts order by title descending
- WP_Query – order with usort by custom meta