Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get alt value of image by ID in WordPress
/**
*
* Get alt value of image by ID
*
*/
alt="<?php echo get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.