Skip to content

Instantly share code, notes, and snippets.

@alexkingorg
Created July 13, 2013 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexkingorg/5991324 to your computer and use it in GitHub Desktop.
Save alexkingorg/5991324 to your computer and use it in GitHub Desktop.
Touch new projects to create their dependent post types.
<?php
function akv3_touch_projects_terms() {
$projects = get_terms('projects');
foreach ($projects as $project) {
wp_update_term($project->term_id, 'projects', array('slug' => $project->slug));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment