Last active
May 23, 2019 11:18
-
-
Save BeyondTheLoop/bde6a9a28efe4f46aaad81c54f415097 to your computer and use it in GitHub Desktop.
Get alt value of image by ID in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* 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