Support

Account

Home Forums Add-ons Gallery Field Categories/ Tags in Image-Sidebar

Helping

Categories/ Tags in Image-Sidebar

  • Hi,

    it would be very nice if the user could choose a category and/or tag for each media in the gallery addon.

    /**
    	 * 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 add_tags_for_attachments() {
    		register_taxonomy_for_object_type( 'post_tag', 'attachment' );
    	}
    	add_action( 'init' , 'add_tags_for_attachments' );
  • Media does not support categories and tags. ACF basically supports those things that are built into WP.

    This would probably be possible, but you’d need to alter the media post type in WP to support categories and tags or a custom taxonomy and then you could add a custom field group to the media library (attachments) that would allow selecting categories while editing the image in the media library.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Categories/ Tags in Image-Sidebar’ is closed to new replies.