Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'd like to be able to add tags to my pages just like I can with posts.

What would I need to do to enable the tag editor/entry for the page editor?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You can use the register_taxonomy_for_object_type function.

The following adds the default 'tag' and 'category' taxonomies to pages:

register_taxonomy_for_object_type('post_tag', 'page');
register_taxonomy_for_object_type('category', 'page');
share|improve this answer
    
Thanks Stephen. This works! I assume there's no need to use add_meta_box('tagsdiv-post_tag', __('Page Tags'), 'post_tags_meta_box', 'page', 'side', 'low'); –  Scott B May 9 '12 at 12:55
    
Nope, just the above. –  Stephen Harris May 9 '12 at 13:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.