ygetarts
Forum Replies Created
-
Forum: Hacks
In reply to: wp_insert_post not completing when run via cronAny ideas?
Forum: Hacks
In reply to: creating a custom taxonomy and loading posts in to itHi Jackson,
Yes, $post_id is set with the return value of $wp_insert_post.
Also, I have been using wp_set_poset_terms with the first three options filled in:
wp_set_post_terms($post_id, "","pnap_in_category");$post_id, “” for tag and the name of my taxonomy, “pnap_in_category”.
I tried wrapping my call to set post terms in var_dump and this is what I get:
object(WP_Error)[86] public 'errors' => array 'invalid_taxonomy' => array 0 => string 'Invalid Taxonomy' (length=16) public 'error_data' => array emptywhich I don’t understand, since I can manually create a new category with the type being my custom type.
Thanks again for the reply.
Forum: Hacks
In reply to: creating a custom taxonomy and loading posts in to itThanks for the suggestion.
I went ahead and tried it, but it doesn’t work. Nothing happens.
My code
wp_set_post_terms($post_id, "","pnap_in_category");and nothing shows in my database.
I found http://codex.wordpress.org/Function_Reference/wp_set_object_terms
and tried that
wp_set_object_terms($post_id, 'EMS', 'pnap_in_category', false);but again, nothing is being added to my wp_terms_relationships table.
Not sure what to do here.