WP Rest API convert permalink to post ID for fetch

The core rewrite API does offer the function url_to_postid() (as mentioned by @stephen-sabatini) which can find a post ID from a URL. However it seems less than ideal to have to make a request up front just to determine the post ID……

Source: https://wordpress.stackexchange.com/questions/282716/wp-rest-api-convert-permalink-to-post-id-for-fetch

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.