0

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?

1 Answer 1

3

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');
2
  • 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
    Commented May 9, 2012 at 12:55
  • Nope, just the above. Commented May 9, 2012 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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