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
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- How to Change Order of Posts in Admin?
- visually sort ordering “custom post types” for end users
- ORDER BY custom field value
- Sorting: custom query with orderby meta_value_num THEN by title
- 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
- Custom Post type sort order not working in the admin area
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- 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]
- Adding Sorting to Website?
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Sorting by tag or category
- Customize the Sorting Dropdown in WooCommerce
- Orderby Post Views
- Creating a category page by alphabet
- 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
- Advanced custom fields sort repeater by date
- Ordering of gallery images without using shortcode in theme
- Combining sorted and random CPT
- 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?
- Show Primary Category first when I display post categories
- 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
- Help ordering Post loop by two meta values
- Best Practices for a Completely Customizable Homepage – without plugins
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Custom taxonomy/category 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?
- How to avoid duplicating same meta_value?
- Sorting/Filter posts from front-end in WordPress blog
- ‘sort_column’ => ‘menu_order’ not working
- Custom post type sorting: alphabetical order
- ORDER BY custom field value out of where clause
- I would like my page editor to be sorted by date created, or updated, instead of in Alpha order, is this possible?
- 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
- inner foreach loop sorting
- 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()?
- Sort appearence order in the_content()
- 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
- Order column custom date using pre_get_posts
- How to display remaining post ( in post__in ) if posts are less then post per page?
- How to sort wordpress posts already selected by WP_QUERY
- 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