Skip to content

Instantly share code, notes, and snippets.

@szbl
Last active January 4, 2019 17:21
Show Gist options
  • Save szbl/0259b3ed5a98bc9453b3757e16acda9f to your computer and use it in GitHub Desktop.
Save szbl/0259b3ed5a98bc9453b3757e16acda9f to your computer and use it in GitHub Desktop.
Get WP Attachment Image Alternate Text (alt text attribute)
<?php
echo esc_attr( get_post_meta( $att_id, '_wp_attachment_image_alt', true ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment