Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // add categories for attachments
- //
- function add_categories_for_attachments() {
- register_taxonomy_for_object_type( 'category', 'attachment' );
- }
- add_action( 'init' , 'add_categories_for_attachments' ); // add tags for attachments function
- function add_tags_for_attachments() {
- register_taxonomy_for_object_type( 'post_tag', 'attachment' );
- }
- add_action( 'init' , 'add_tags_for_attachments' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement