Skip to content

Instantly share code, notes, and snippets.

@lschatzkin
Last active March 8, 2017 23:54
Show Gist options
  • Save lschatzkin/5666496 to your computer and use it in GitHub Desktop.
Save lschatzkin/5666496 to your computer and use it in GitHub Desktop.
How to Change a Custom Post Type from one Custom Post Category to Another
Example:
To move custom posts from Activity to Explore the Area (in this case, Airports, Transportation):
- wp3p_posts: get the ID for an example custom post (ex. 430)
change palms_activity to palms_explore for each post that needs to be moved
- wp3p_term_relationship: find the term_taxonomy_id by object_id (ex.430=post ID, term_taxonomy_id = 30)
- wp3p_term_taxonomy: change tl_activity_cat to tl_explore_cat where term_taxonomy_id (in this case, = 30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment