How to specify tags for the record types in wordpress?

0 like 0 dislike
6 views
Created a new post type for portfolio. But the parameter "supports" tags are not present. When adding a new record cannot add her tag.
It is clear that I can do it using custom fields. But I would like to make sure that you cannot set tags for the entry type.
by | 6 views

1 Answer

0 like 0 dislike
Use 'taxonomies' => array('post_tag') in your register_post_type() when registering an arbitrary type of posts.

Here is a good example of open spaces:

register_post_type('movies', array( 'labels' => array( 'name' => 'Movies', 'singular_name' => 'Movie', 'menu_name' => 'MOVIES', 'all_items' => 'All Movies', 'add_new' => 'Add A Movie', 'add_new_item' => 'Add New Movie' ), 'public' => true, 'supports' => array( 'title', 'post-formats', ), 'show_in_admin_bar' => true, 'taxonomies' => array('post_tag'), ) );
by

Related questions

0 like 0 dislike
1 answer
asked May 11, 2019 by AKKJIuMATu3uPOBAHHbIEE_PA
0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,771 users