Tutorial by Examples

<?php // hook into the init action and call create_book_taxonomies when it fires add_action( 'init', 'create_book_taxonomies', 0 ); // create taxonomy genres for the post type "book" function create_book_taxonomies() { // Add new taxonomy, make it hierarchical (like categorie...
You can also add same custom created taxonomy into post type page using below code. function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'genre', 'page' ); } add_action( 'init', 'add_taxonomies_to_pages' ); Add above code into your theme's functions.php file. Same way...
// add tags and categories to pages function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_taxonomies_to_pages' ); if ( ! is_admin() ) { add_action( 'pre_get_posts...
You can add this code to your custom functions.php file: // add tags and categories to pages function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_taxonomies_to...

Page 1 of 1