Hello WordPress folks,
I create articles in WP via REST API. Title, content and custom fields are transmitted via the API. This results in a URL in WP, e.g. for the title ‘Example title’ the URL mydomain.xyz/category/example-title.
If I submit a second article with the same title, it gets the URL mydomain.xyz/category/example-title-2.
With the help of the ‘Custom Post Type Permalinks’ plugin, the permalink is then supplemented with content from the custom fields. This way I (actually) get a consistent and unique URL.
How can I ensure that the number (-2) is not added to titles with the same name? Is there a way to transmit the desired URL directly via API to prevent consecutive numbering for titles with the same name?
Thanks for your help!
Have you tried googling?
https://stackoverflow.com/questions/51469058/creating-page-with-custom-url-meta-tags-using-wordpress-rest-api