Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Adding custom CSS field to Media Library image

$
0
0

Replies: 1

I was able to add a “tag” field to my Media Library images with the following code:

function wptp_add_tags_to_attachments() {
        register_taxonomy_for_object_type( 'post_tag', 'attachment' );
    }
    add_action( 'init' , 'wptp_add_tags_to_attachments' 

Which I found online and it worked perfectly. This is what it looks like:
See image attachment
I now want to add a field to add a CSS class name to an individual image. But I can’t find nor figure out how to achieve this.
Has anyone done this and can you point me in the right direction on how to accomplish this?
As always… Thanks.


Viewing all articles
Browse latest Browse all 59525

Trending Articles