How to Add Categories and Tags for WordPress Pages September 26, 2019 | Md. Shahidul Islam

Add the following code in your theme’s functions.php file for Categories.


function add_categories_to_pages() {
    register_taxonomy_for_object_type( 'category', 'page' );
}
add_action( 'init', 'add_categories_to_pages' );

Add the following code in your theme’s functions.php file for Tags.


function add_tags_to_page() {
     register_taxonomy_for_object_type( 'post_tag', 'page' );
}
add_action( 'init', 'add_tags_to_page');

WordPress admin menu looks like below screenshot

Categories Tags