Skip to content

Instantly share code, notes, and snippets.

@IgnacioGaldames
Last active August 29, 2015 14:17
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 IgnacioGaldames/fa886b97ec07bd98b13b to your computer and use it in GitHub Desktop.
Save IgnacioGaldames/fa886b97ec07bd98b13b to your computer and use it in GitHub Desktop.
Añadir terminos a custom taxonomy via functions
function insert_taxonomy_terms() {
wp_insert_term(
'Test',
'taxonomy',
array(
'description' => 'taxonomía via functions',
'slug' => 'test'
)
);
wp_insert_term(
'Test 2',
'taxonomy',
array(
'description' => 'taxonomía via functions',
'slug' => 'test-2'
)
);
}
add_action('init','insert_taxonomy_terms');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment