Categories

Featured templates

WordPress. How to add tags to custom post types

Elina Webb November 30, 2013
Rating: 3.4. From 5 votes.
Please wait...

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

Wordpress Web Themes
This entry was posted in WordPress Tutorials and tagged custom, post, tags, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

Live Chat
We help you to choose the right product.