You want to orderby ‘date’ not by ‘meta_value_num’ because it is to order numerically. So if you were ordering items by their price, then you would want to use ‘meta_value_num’. The meta_key ‘news_date’ is most likely in date format.
You should also cast the meta_value to DATE using ‘meta_type’ => ‘DATE’.
$args = array(
'post_type' => 'news',
'posts_per_page' => 10,
'meta_key' => 'news_date',
'meta_type' => 'DATE'
'orderby' => 'meta_value',
'order' => 'DESC',
'paged' => (int)$my_page
);
If your getting the correct order, you could always calculate the offset yourself by multiplying paged * posts_per_page. Also make sure that your $paged variable is an integer if you grab it from a query string then it is not an Integer.
Related Posts:
- Custom WP_Query order by post_meta and (author) user_meta
- WP_Query ordered by custom field that is a date string?
- Order posts by tags count?
- Add and in the header while looping over custom query in page template
- Transient pagination not working properly
- Custom Post order for homepage
- How to output different posts per page?
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- How to orderby multiple meta fields if some fields are empty
- Weird orderby => post__in issue
- Order by summing multiple values
- Order by empty custom field
- Multisite pagination issue by multi query archive 404
- Yoast primary category query modification
- Notice thrown when creating numeric pagination on custom query
- WP_User_Query orderby meta_val_num
- Unable to paginate a custom page query
- I am officially missing something about transient posts
- Pagination of custom page with custom fields query
- Meta query orderby meta_value_num sorting by role first
- Order posts by tags count?
- Why pagination is not working with tax_query param?
- How to get_comments() ordered by date and parent?
- WP Query. Ordering posts by another post types meta
- orderby in WP_QUERY – Use the order from the Dashboard
- Custom pagination (Title, date and teaser)
- Pagination is not working on custom query inside a custom home page template
- Pagination in custom query in a category page
- Horizontally paginate through sets of blog posts?
- Pagination in WP query with transient API
- Get posts that were most recently tagged
- Search results stuck on page 1
- How can i retrieve default post per page value? from settings->reading. And total number of posts?
- Pagination with custom SQL query
- How to query for most viewed posts and show top 5
- Different ‘posts_per_page’ setting for first, and rest of the paginated pages?
- WP_Query for WooCommerce Products
- How to order posts tag by tag?
- Pagination with 5 posts per page
- Perform query with meta_value date
- Order posts by date and then by custom field
- Order by the results of a function with WP_query
- Pagination not working for category posts
- Search – Ajax – Alter Query Parameters with Pagination
- How to order posts in wp_query by a meta_value of the corresponding author
- Show single post then all posts (with pagination)
- WP_query category__in not working, only pulls from first category
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- Order WP Query posts by custom order calculated from post meta values
- Wp query orderby ‘title’ doesn’t work
- Different string for specifed post type on posts listing at homepage
- How can I order Wp_Query hierarchically?
- if/else on custom query gives 200 OK when condition not met?
- WP_Query ajax loader detect end of posts
- Storing query variable and then using wp_reset_query
- only delete post within query / for each statement (front end)
- Complex WP_Query order request: DESC by day, but then ASC by time
- How to detect if query is runned from widget?
- WordPress Pagination changes my template
- Sort wordpress custom posts based on meta value
- Custom Pagination Layout for Elementor widget
- Pagination outside of loop
- How to get list of posts from permalinks?
- Is there a reason why Pages are not publicly_queryable?
- Check return value of get_posts
- Exclude some authors from query
- Get a list of posts by specific category
- How to check the array values, what WP_Query has brought to me?
- How to Order a list of taxonomies? orderby?
- How to add custom meta to ‘pre_get_terms’?
- Shortcode for custom query not returning results when attributes are added
- Should I reset $wp_query?
- Page navigation doesn’t seem to work when I add offset?
- Get specific ACF key and value from all posts – no access to DB
- Insert images into wordpress post with a query
- WP_Query meta compare must include ALL array values
- How can I order a post query’s results based on the number of matching taxonomy terms?
- WP_query pagination on frontpage
- pre_user_query vs pre_get_posts
- WP Query with meta queries
- How to show terms from another taxonomy
- Showing the correct number of posts_per_page when avoiding the use of post__not_in
- My entry results are not consistently alphabetized
- How to order posts, that have already been filtered by custom taxonomy, by their category names?
- How to set up pagination for a custom loop on a global template (author.php, tag.php, archive.php?)
- Ignoring ‘a’ when sorting posts
- Custom query for tag and custom tag from 2 post type
- WP_Query secondary query failing
- add_query_vars does not work
- Retrieve posts in custom post type and specific taxonomies
- Why won’t my paged wp_query work? [duplicate]
- Pagination doesn’t work for home page custom post type query
- Get the number of rows from $wpdb->get_results not working
- Loop issues when creating custom query for media uploader
- Query multiple taxonomies with pagination
- How to put posts with some taxonomy on top of others in `pre_get_posts`
- Use value from meta key array for use in WP_Query
- WP_Query sort by ACF date field (newest first) with blank dates first
- Pagination only showed when no category is set in wp_query
- taxonomy-{term}.php terms pagination returning 404 after a certain page