-
Hello,
I’ve been working on programmatically creating posts on my WordPress site using the REST API. Specifically, I’ve been trying to set the rank_math_description meta data (from the Rank Math SEO plugin) while creating a post.
Here’s a brief overview of the steps I’ve taken:
I use the endpoint https://MY_WEBSITE_DOMAIN/wp-json/wp/v2/posts to create a post.
When sending the POST request, I include the following meta data in the payload:
json
Copy code
“meta”: {
“rank_math_description”: “Test”
}
The post gets created successfully, but when I check it, the Rank Math meta description is not set.
For context, this is part of an automated script that generates content and then pushes it to WordPress. The script has been mostly successful except for this particular issue with setting the Rank Math meta description.I’ve also referenced a previous support conversation where a method was suggested to set the rank_math_description. I’ve followed the suggested method, but it doesn’t seem to work in my context.
https://support.rankmath.com/ticket/how-to-setup-meta-description-while-creating-post-using-wordpress-rest-api/I’m reaching out to see if there are any known issues with this or if there’s a specific method or endpoint I should be using to set the rank_math_description meta data while creating a post. Any guidance or alternative solutions would be greatly appreciated.
Thank you for your time and assistance.
Best regards,
The ticket ‘Unable to Set rank_math_description Meta Data via WordPress REST API’ is closed to new replies.