Is is possible to get post by slug from Wordpress' XML RPC ? The getPost method can only take post_id for the parameter. Theoretically, I could get the post as HTML and fetch the post id from there but I think this would be quite nasty solution.
Asked
Active
Viewed 476 times
1 Answers
0
It seems this is impossible to get a post by its slug. Look here https://codex.wordpress.org/XML-RPC_WordPress_API/Posts, these is no mention of such functionality. In my case I just showed post slug in url (for SEO purposes) and at the same time added post_id
as GET
parameter for the url so I could fetch the post with getPost()
method in my action.

Akmal
- 543
- 7
- 13