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
- Multiple queries and pagination
- filter posts by meta key with pagination
- Determining what post is displayed out of total posts found
- Trouble Making WP_Query paged
- WP_Query meta compare must include ALL array values
- how to retrieve WP_Query without ordering by date [duplicate]
- Start Query from 2nd Post without offset
- Adding pagination to sub-wp_query within a singular post page
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- How to filter a static post page with ajax and $wp_query
- Pagination problem by using WP_Query
- Ajax (jquery) wp_query pagination returns -1
- Display upcoming events in the next 30 days by querying posts with timestamp in custom meta
- orderby ignored by wp_query
- WP_Query and pagination AGAIN?
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- WP_Query Pagination
- Sort posts using multiple custom fields and menu_order in single query?
- meta_query where the meta value is not the post title
- WP_Query, Paginate by Custom Field
- Post incorrectly excluded when using “category__in”?
- Query multiple post types, but different order for each
- Reciving Error 404 blog/page/2/
- Multi-layered WP_Query
- Why is my pagination /page/2 taking me to index.php?
- `offset` WP_Query argument dont work via `pre_get_posts`
- Function the_posts_pagination() not compatible with WP_Query arguments
- Filter products on category AND tag
- Display posts ONLY from the current logged in user and current week/year/month Elementor posts
- WP_Query orderby
- adding pagination to a foreach loop in wordpress
- WP_Query order by multiple meta keys & fields
- duplicated posts when using pagination
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- wordpress pagination wont render on custom page template even though its right under the loop like the documentation says so
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- Query pages created by deleted users
- How can I order a post query’s results based on the number of matching taxonomy terms?
- How to sort store location by specific category order in WP store locations
- pre_get_posts pagination not working
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- How to sort wordpress posts already selected by WP_QUERY
- Pagination repeating posts on search results
- setting offset to category number in archive page
- Woocommerce Get Orders By Meta Value
- Pagination not working on archive.php template?
- WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination
- WP_query pagination on frontpage
- Any way to use FETCH_KEY_PAIR with $wpdb?
- pre_user_query vs pre_get_posts
- Exclude post from wp_query based on custom field boolean
- Custom WP Query order function possible?
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- Custom order of posts in wp_query and different taxonomies
- Get posts that match defined arrays of tags
- Doing $wpdb->get_results returns NULL, doing the same query in my DB returns correct value
- WP_Query random ordering not working since 5.4
- WordPress Query custom ordering by temporary variable
- Pagination unique to a widget
- Custom order revolution sliders post base slides as inserted in Specific Posts List field
- Move some posts to end of sort order, even if there is a sort in the wp_Query already
- Adding nofollow to all the post links in get_posts with pre_get_posts or WP_Query
- WP_User_Query Orderby Not Working
- How to get meta key list efficiently?
- Order by value of Custom Field using url string
- Pagination inside the blog page not working
- Pagination for Category does not work
- Query against multiple locations within single custom post type post