You can hook into the posts_clauses
filter and change ASC
to DESC
there with a simply str_replace
. The filter has one argument $pieces
, which is an array of the MySQL statement parts.
Related Posts:
- get_terms orderby name as numbers
- Displaying posts sorting by a custom criterion
- List CPT by menu_order with children right after parent
- How to Change Order of Posts in Admin?
- visually sort ordering “custom post types” for end users
- Different post sort order within different categories
- Custom Table Column Sortable by Taxonomy Query
- How to get order of posts?
- How to order users alphabetically by their last name?
- Sort posts by tags in category pages
- Order posts by meta_value even if meta_key is not filled
- How do I allow users to sort posts? [duplicate]
- How to sort posts by last name (2nd word) on ONE category only?
- Sorting results from JSON-API on custom fields
- How can I custom order the results from wp_list_categories?
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Sort users in get_users() in custom order
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- 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]
- Adding Sorting to Website?
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Orderby Post Views
- Arrange and separate posts
- Sorting posts by multiple values, combined
- Meta query with order by another custom field
- 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’
- How do I sort posts with multiple pages
- Vertical alphabetically post columns
- orderby:date not working
- Order wordpress taxonomy parent terms by their children count
- Use pre_get_posts to sort meta_key by an array of values
- Sorting custom post type by usermeta
- Wp_query: sort by PHP variable
- Sort posts by meta key that is serialised with other meta keys
- Sort query_posts for Parent Pages to menue order or the count?
- orderby field – list of available options?
- How to redefine the sorting of product categories by menu_order?
- User Query sort on custom field then name
- Sort wordpress custom posts based on meta value
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- Understanding the orderby in WP_Query?
- WP Query sort by meta value
- How to sort posts inside categories
- Best Practices for a Completely Customizable Homepage – without plugins
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Sorting posts by custom field value
- wp e-commerce group product by category [closed]
- How do I create a sort capability by Title, Category, Author, Date?
- how to get post order by post id wp_query?
- Custom post type sorting: alphabetical order
- ORDER BY custom field value out of where clause
- Sort custom posts in archive by multiple values: date AND meta key
- Sort scheduled posts in ascending order by default
- How to sort by number
- sort items by randomness
- Order BY Most Liked And Published Between Previous Week Monday And Next Week Monday
- Sortby parameter to sort users
- Update meta_key value for a page
- How to manage a particular “order by” for get_search_query()?
- Natural sort / ordering wp_dropdown_categories
- ASC and DESC separately from orderby
- Sort my event calendar by date
- orderby ignored by wp_query
- Sort users by meta key value even if meta key not present for all users
- Table Sorter sort by span title?
- Sort products by Sale price and stock status
- How to sort store location by specific category order in WP store locations
- make two custom columns sortables
- Order posts ascending from posts in array
- How to sort products by price ASC and place all no price products to the end? (Woocommerce)
- sort title descending with title with number
- Custom post type order by post_title
- ACF pro: Group teaser by datepicker year and display custom sub fields [closed]
- WP Query with meta queries
- meta_query orderby sort multiple keys
- Order 2 meta_queries differently in WP_Query?
- Orderby Title not working
- Multiple sorting criteries (order by)
- Using Orderby and meta_value to order natural/alphanumerical
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- Sort an array with an ACF meta key
- Pin to Top Functionality using orderby custom field then event date
- Display three sequential posts on each page load, without repeating previous
- 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
- How to order posts by the user_login that corresponds to a meta_value (which is a user id)?
- Sorting: custom query with orderby meta_value_num THEN by title
- Grouping posts starting with same letter
- Multidimensional array sort?
- Can’t sort custom column on user.php by number / meta_value_num?
- How do i Sort my Posts
- How to resort my id in wordpress?
- Ascending & descending posts on same page with IF statement