-
I’m trying to add posts that are displayed on our website from the wordpress API. However whenever a post is created, the “Make Term Primary” radio button isn’t selected on the category. As a result, the post does not appear on the site.
Steps to reproduce:
Create an API request to the wordpress posts endpoint with a category. See how the category does not get selected as “Primary Term”.I tried something like this and it still doesn’t work:
$postData = array(
‘title’ => $sai_title,
‘content’ => $sai_body,
‘categories’ => array(33),
‘status’ => ‘publish’,
‘meta’ => array(
‘rank_math_primary_category’ => 33
)
);
The ticket ‘How to “Make Term Primary via API”’ is closed to new replies.