I want Get wordpress media library image class. I have attachment id and I tired this but won't able to get it.
print_r(wp_get_attachment_image_src( $attachment_id, $size, $icon, $attr ));
How can I get it ?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
If this is a regular custom field, use
$classes = get_post_meta( $attachment_id, 'name_of_the_field', TRUE );
attachment is just another post type, regarding to meta data, it works like regular posts or pages.