Post ID is not an external ID of the post but an internal one and you should not expect any consistency in it. Since almost everything is stored at the post table the value of ID depends not only on the number of “true” posts but also the number of revisions, images and any other CPT.
On top of that there are post that are not publicly available like drafts.
You should just use the offset and the number of results that you want as parameters to the query.
Related Posts:
- How to add category to: ‘wp-admin/post-new.php’?
- WP Rest API v2 filter and display latest post with specific tag
- Getting featured image with PHP and not javascript from wordpress api _embed [closed]
- Creating a WordPress Post via REST API – HTML or Markdown?
- How to check if post meta key exists or not in wordpress database
- How to allow hidden custom fields to be added from wp-admin/post.php?
- Update all posts automatically when using post_meta
- How to batch update post content with custom post meta value
- Change slug with custom field
- WP REST API, query total posts in a category
- Setting post meta data to random value during post status transition / on publish
- Edit meta data does’t work with custom sql
- Human Time Diff, change mins to minutes
- Does WP get all post_meta on POST page?
- Sanitizing `wp_editor();` Values for Database, Edit, and Display
- Adding Multiple Values to a Post Meta Key
- Using radio button meta data from a custom meta box
- WordPress blog posts api – get posts by author
- WP rest api returns 404 only when author param is used
- PHP Notice error (when on 404 page)
- What Is meta_id In wp_postmeta?
- Checking if a post with certain meta value exists
- How to permanently delete a post meta entry?
- Exclude posts w/ specific post_meta on Rest API endpoint
- Modify WP_Post before processing
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- Change post_date to post_modified date on post template?
- Update Line Item Meta Data – WooCommerce API
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- WordPress REST API not returning all posts
- How can I sort posts by the date and a custom meta field?
- is there a way to show the the post title after the image?
- Get Meta Key Value While Saving Post
- Exclude post_meta from Rest API Endpoint
- WP Remote Request not returning all of content via request
- Get more than one author’s posts with REST API
- How can I get the media inside a post?
- WordPress Rest API Create Post
- Force the “Choose from the most used tags” meta box section to always be expanded
- Meta value does not save for scheduled posts
- How to compare two posts including their meta fields on a scalable base?
- Getting value from get_post_custom
- Is it possible to paste a link without tags and make it directly a link in a post?
- Cannot retrieve a custom RSS field from posts
- How to automate featured posts number? [duplicate]
- How to save meta checkbox WordPress
- How to calculate the average of a post meta value(Numeric) of a specific author
- wpColorPicker – problem with implementation to post meta
- search blog posts by author first name and or last name
- if in category but only with post meta
- What date to use as a post date? date_gmt or modified_date_gmt
- Update post meta within save_post action
- Custom wp-query in wordpress rest api
- Saving Post Data in Another Database
- Custom permalink for each post
- How can I tell if a post has been published at least once?
- Is there a way getting post fields using `transition_post_status`
- Add multiple meta keys to a post at once
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Adding a meta box to determine the sidebar [closed]
- The loop starting at a certain ID
- Simple Custom Metabox Not Saving
- Get post category as a separate string and url
- Optimal WP Web App Backend for mobile app development
- Pull in posts using post meta for REST API
- Rest API Paginate until all posts are imported
- Featured Images most often doesnt appear
- Post meta not working
- How to bulk Update URLs to new values?
- SQL DELETE multiple post_meta on single and multi-sites
- How do I assign an attachment to a post using only the REST API?
- WordPress rest API get Posts parent by post ID
- Updating post status via rest api
- exclude particular category in api
- How to retrieve all meta data directly from the $post object? Such as $post->related_topics?
- How to set the post permalink using the WordPress REST API?
- What is proper filter or hook action to add data to the $post object?
- How to prevent post update using transition_post_status
- Automatically select template based on query string for New Posts
- Create Posts from API response without duplicates
- How to hide meta from search result only on pages?
- WP_Query sort by meta_value_num or date
- Loading posts outside wordpress
- Check if user has avatar
- Creating Ordered Query using Meta_key
- WP-API + JS Backbone client – how to update post meta
- post_name is not stored until post is published… where should I store my slug until it goes live then?
- Filter question list on substring of metavalue
- Add a meta to a post submited from a frontend form
- Show posts between two Custom Fields date
- How to get only current images of a post
- Ordering posts alphabetically by meta keys and title
- Run function after post is updated
- Where should get_post_meta() go to get $post->ID get_post_meta() is empty and $post->ID & get_the_id() are working
- Adding custom fields to the Quick Edit screen – puzzled about the column concept
- If meta_key exists then don’t select this post?
- WP Rest API feature image breaking react component
- NewsPaper WP Theme – Additional Related Posts Filter by Time (divTag composer)
- Site ‘Categories’: save an admin global setting with post metadata [closed]
- Translation related post text to Arabic