WordPress’s REST API should provide the information you need.
If you’re after a post with the slug the-slug-you-want
, then you can request the data about any post(s) with that slug using the URL https://example.com/wp-json/v2/posts/?slug=the-slug-you-want
. This returns the post(s) with that slug, and in the post’s/posts’ JSON objects the ID is available.
Related Posts:
- How to add an admin notice upon post save/update
- Get the Current Page Number
- Including categories in search results
- How does one reduce the number of stored revisions?
- How to add editor’s name to entry meta byline?
- Use an attachment in multiple posts
- Using $wpdb to query posts with meta value containing current post_id
- Download external images if post is publish
- Forcing oembeds to top of post
- I’m having some issues with previous_post_link() and next_post_link()
- Specify number of posts in my ‘tax_query’
- Can I change a post to a page by changing it’s type?
- Where is the “ancestors” post object attribute?
- How can I display a specific user’s first published post?
- custom single.php not working
- Change existing label in the admin bar with something else
- Append a to every post to force additional page link (and static content)
- Limit function to specific post category
- How to show a full post, not just an excerpt
- get selected post using $_GET
- How much of my site can I recover from public_html?
- How to get a list of all the years that have posts
- How do I use `posts_distinct` correctly?
- How to hide first gallery for every post?
- How to display related posts by subcategory and not parent category
- How to find what index page a post is on?
- Get posts by name and taxonomy term
- Admin Posts Table Column Fitlering is not working for Custom Post Type
- WordPress REST API not returning all posts
- Is it possible to create a form post wordpress custom navigation link?
- creating front end image uploader that uploads images as posts
- How can I sort posts by the date and a custom meta field?
- Get Meta Key Value While Saving Post
- How can i display gallery shortcode output under Post text
- Hiding Draft Post In Admin
- XML-code sent via the POST method to the URL (API) [closed]
- Get all images in post and comments like Twitter before post title
- How to list recent posts in a wp nav menu?
- Restrict edit, but allow preview for custom post status
- How to display posts via custom taxonomy terms using checkboxes?
- “Right Way” to make custom Loop respect reading settings inside admin panel?
- WordPress query_posts by tag doesn’t work anymore(?)
- why does wordpress ignore the post args?
- obtain the author id given the post id
- Get current post data into array?
- do more action after I publish a post
- Retrieve only posts from a specific user in wp-admin/edit.php
- Adding an Archive button to posts page for administrators
- Security to delete post by Admin
- Is it possible to customize the post according to post format in single.php?
- Delete post after x minutes if user role is
- WordPress website loads more posts than expected
- How to create a “latest news” page showing a list of posts from blog category
- How to add the time of a post to the list of posts on the administration page?
- Count several post tags
- How to generate/create link automatically on every word of post in wordpress
- how to handle the loop using filling bootstrap grid structure?
- datepicker value in mysql
- How to edit the ‘
- List all native posts in template page?
- Scheduling posts via sql
- Display specific posts on home page
- How to display WP Query filters?
- Finding a post’s slug
- Is that possible put a whole POST in a list ,
- Order posts by date
- Conditionally exclude post from specific category on home page sidebar?
- Posts and Pages w. private visibility don’t show up in existing content
- posts and cms and posts again
- Move position in post list for a custom checkbox column
- How to create custom post page in WordPress?
- How to add a custom class attribute into code wrapper? [duplicate]
- Redirecting wordpress search query to archive page
- How do i bring out post category name in my widget?
- Passing values via an Ajax querystring
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- Unable to edit or post after enabling SSL
- Dynamically load posts based on category
- Set featured image on creating new post
- Get Categories & Posts With Type Article
- My post permalinks are always the same
- Multipage Post URL correction
- show latest authors blog post
- Admin Post List Only Show One Category
- Featured Images link to post parent
- Checking if some condition is matched before inserting post into database
- how to create cron that post events daily in wordpress?
- Posts being replaced/deleted
- TCPDF and permalinks
- How can i show only 30% of the “the_content(“More…”)”?
- wp_query select if have comments
- Help post permalink
- Redirecting posts in WordPress to a specific page
- Wrap div-tag around posts in page
- How to make post stick to its own div
- Numbers of new post since the last visit of user
- Post data returning null [closed]
- website images getting corrupt automatically
- Posts Page in WordPress loading bare HTML of my homepage
- Output number of WordPress posts remaining until a post milestone is reached