When fetching the posts, I can access the link property which represents the full post link.

But when creating a post, what is the way to set that permalink value?

Setting the slug does not seem to work since I would like to set a permalink like /foo/bar/post-slug.

In the post edit UI, I can set it like this:

  • You can’t set the link to something arbitrary. It’s generated based on the site’s permalink structure, the post’s slug, and whether it has any parents. – Jacob Peattie Oct 30 at 11:26
  • But in the WordPress post ui, I can do that. – Ionică Bizău Oct 30 at 11:28
  • You can change the slug, not the full URL. As such you can achieve the same thing by changing the slug via the API. – Jacob Peattie Oct 30 at 14:02
  • @JacobPeattie no, that’s the full url – Ionică Bizău Oct 30 at 20:09
  • That's not a standard meta box in WordPress. You're using something custom to allow this. In which case the answer will be specific to whatever you're using. So you'll nee to ask its author. – Jacob Peattie Oct 31 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.