Aggiungere categorie e tag a pagine WordPress

Indice
  1. Go to your site’s functions.php file.
  2. Add the following code to your theme’s functions.php and save your modifications

Categorie #

//Aggiungi categorie a pagine
function add_categories_to_pages() {
register_taxonomy_for_object_type( 'category', 'page' );
}
add_action( 'init', 'add_categories_to_pages' );

Tag #

//Aggiungi tag a pagine
function add_tags_to_pages() {
register_taxonomy_for_object_type( 'post_tag', 'page' );
}
add_action( 'init', 'add_tags_to_pages');
Torna in cima