• Hello,

    I’ve been working on WordPress tools internally for a specific WordPress based website. The tools are based around batch control of just about everything. All has gone great, except I’ve run into a bit of a roadblock with tags.

    So far, when batch creating/updating posts, I’ve grab a user entered comma delimited tag string, split it out and check to see if each tag already exists in the wp_tags table or not. If the tag does not exist, it inserts the tag, grabs it ID, then inserts the reference to the current post in the wp_post2tag table. All of this goes off without a hitch. Internally within my tool, all posts have associated tags listed properly and all appears to be well, but within WordPress the tags are not recognized. I can however Edit the post and add the tag from the tag list. Once Saved, the tag shows up fine.

    What am I missing? What table am I -not- inserting to correctly? The database scheme seems pretty straight forward to me, I also tried creating the META data in the wp_postmeta table, but with no luck.

    Any tips, suggestions? It seems to me this would be an Advanced topic.

  • The topic ‘Inserting tags directly to database, what am I missing?’ is closed to new replies.