Support » Fixing WordPress » assigning categories to attachments

  • If someone else has asked for similar things, I apologize, I just haven’t been able to find it yet.

    I’ve searched around for people trying to do this and found random help. I’ve actually got a good interface going, for adding the categories and viewing those already assigned, however, upon doing so the category count is not updated. So when I go to view the category list they all just suggest there are 0 associated items.

    i’ve added:
    register_taxonomy_for_object_type(‘category’, ‘attachment’)
    add_post_type_support(‘attachment’, ‘category’)

    i’ve added a custom admin page with ‘add_media_page’, to display categories under the media library. this also automatically added a ‘Media’ column in the table, with the id of ‘posts’, again with all entries saying ‘0’ for count.

    I guess all I’m trying to figure out is how to include the attachment post_type to the category count.

  • The topic ‘assigning categories to attachments’ is closed to new replies.