Skip to content

Instantly share code, notes, and snippets.

@eccentricpixel
Created November 22, 2014 10:52
Show Gist options
  • Save eccentricpixel/5d0141e1f76f9008a0e3 to your computer and use it in GitHub Desktop.
Save eccentricpixel/5d0141e1f76f9008a0e3 to your computer and use it in GitHub Desktop.
Add tags to media library #WORDPRESS
// apply tags to attachments
function wptp_add_tags_to_attachments() {
register_taxonomy_for_object_type( 'post_tag', 'attachment' );
}
add_action( 'init' , 'wptp_add_tags_to_attachments' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment