If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WordPress. How to add tags to custom post types

This tutorial shows how to add tags to custom post types (for example, ‘Our team‘ ) in WordPress.

WordPress. How to add tags to custom post types

  1. Log into WordPress Admin Panel.

  2. Go to Appearance > Editor, select the active theme (themeXXXXX) and open theme-init.php file under this theme files list:

    Wordpress_How_to_add_tags_to_custom_post_type_our_team-1

    Search for this code – my_post_type_team:

    Wordpress_How_to_add_tags_to_custom_post_type_our_team-2

  3. After team post registration:

    register_post_type( ‘team’, array( … )); add this code:

    register_taxonomy( 
        		'team_tag', 
        		'team', 
        		array( 
        			'hierarchical'  => false, 
        			'label'         => __( 'Tags', CURRENT_THEME ), 
        			'singular_name' => __( 'Tag', CURRENT_THEME ), 
        			'rewrite'       => true, 
        			'query_var'     => true 
        		)  
        	);
    

    Wordpress_How_to_add_tags_to_custom_post_type_our_team-3

  4. Click to ‘Update File‘ button.

  5. Go to ‘Our Team‘ page, and check the posts there. You will see the Tags section:

    Wordpress_How_to_add_tags_to_custom_post_type_our_team-4

Feel free to check the detailed video tutorial below:

WordPress. How to add tags to custom post types