Assigning Terms to Post
-
I am writing a system for a friend that automatically generates posts.
This system will add tags and categories to the post, but I am running into a problem I have never seen before:
I can only assign a tag to a post, IF the tag does not already exist on the remote site.For example, I have a bit of code that looks like this:
wp_set_post_tags(42,array("meaning","life"));
This will work, but ONLY if neither the “meaning” or “life” tags had already been created.
For those who want the EXACT details of my setup, I doing everything via the WP REST API, with THIS extension (waiting for the API to fully support categories+tags), and THIS chunk of code (slightly modified to be a stand-alone script)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Assigning Terms to Post’ is closed to new replies.