Skip to content

Instantly share code, notes, and snippets.

@xafarali
Created July 9, 2013 01:28
Show Gist options
  • Save xafarali/5953928 to your computer and use it in GitHub Desktop.
Save xafarali/5953928 to your computer and use it in GitHub Desktop.
Image Caption Alt and Description
<?php
$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
$image_title = $attachment->post_title;
$caption = $attachment->post_excerpt;
$description = $image->post_content;
//$img_path = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ),'full') ;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment