• haxxxton

    (@haxxxton)


    Hey guys,

    I have been working on a blog space that i want to give the users the ability to add and edit posts for a psuedo-backend.. i have it adding and editing posts fine.. however, i have been told i need to implement tags into the posts and edits..

    now i have it currently able to display the tags that are relevant to previous posts… but using my back end its not working to either edit them or add them

    I have read through
    http://codex.wordpress.org/Function_Reference/wp_insert_post
    and it shows that you can add the ‘tags_input’ into the $posts array.. but then doesnt mention how you write $posts to the database..

    my code looks like

    [Code moderated as per the Forum Rules. Please use the pastebin]

    now my understanding of why this is not working is that the $post_to_edit data that is being handed to wp_insert_post / wp_update_post is only dealing with the wp_posts database table…

    does anyone know how i can add/edit tags to the database using wp_insert_post and wp_update_post??

    Thank you in advance

The topic ‘inserting tags when using wp_insert_post’ is closed to new replies.