Calling the_content
from within attachment.php will bring you the Attachment Description.
Put the code below on your page and see what you can get from within attachment.php file:
while ( have_posts() ) : the_post();
/**
* @link https://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata#Related
*/
$data = array(
get_the_ID(), // Gets att ID.
get_permalink(), // Gets att page link.
get_the_title(), // Gets att title.
get_the_content(), // Gets att description.
wp_get_attachment_metadata(), // Gets att metadata.
);
var_dump( $data );
endwhile;
Also, you might want to take a look at https://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata#Related and see other functions that will perhaps be useful for you.
Related Posts:
- Adding a custom image upload size and making it selected by default?
- How to register images uploaded via FTP in media library?
- How to upload imagick resource to media in wordpress
- WordPress media upload “HTTP error”
- Adding a querystring to an image URL when clicking ‘insert into post’?
- How to get media objects
- WordPress automatically adds links to uploaded images
- Get featured image with custom size outside WordPress
- Convert all uploaded PNG files to PNG-8 format
- Edit Image/Image Details – Replace button missing
- How to automatically convert images to WebP on WordPress?
- Upload images to remote server
- Uploading media with the REST API
- Remove “Insert from URL” link in Media upload – WP 3.5
- Which filters or actions to use after a media upload and delete?
- Decrease file size upload in Media
- Hide custom image sizes from media library
- Change the filename format of saved featured images
- Hide old attachments from wp media library
- Failed media upload: “The uploaded file was only partially uploaded.”
- Create Image Uploader for Widget
- Using file_exists to check file in Uploads
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Rename image uploads with width in filename
- Admin Media grid view images won’t load
- Debugging upload problem: What part of WP does actual image-resizing?
- How to resize image on client-side before upload?
- Add custom image sizes to media uploader
- Upload images and attachments from frontend form
- Image upload via FTP to wordpress media library
- How do I get images (with a thumbnail preview) to show in search results?
- Different upload path per file type
- Site icons with alpha channel for self-hosted WordPress blog network
- Validate Uploaded Image using WordPress’ Built-in Functions?
- Get most recent media upload
- Convert all images to PNG on file upload
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- Can’t upload image using media_sideload_image
- Upload multiple images to a Woocomerce product
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- Enable custom logo upload if logo is not in header
- Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- Redirect to another page using contact form 7? [closed]
- WordPress function when file is uploaded, deleted or edited
- zip unzip attachments in wordpress
- Get images attached to a specific page
- Is there a way in WordPress to convert images to WebP without a plugin?
- Images Uploaded saving onto older/previous year folders
- Convert canvas to image and upload image to server
- Custom upload folder
- WordPress İmages Upload & Delete Error
- How to Make Thumbnail of Post Stay Animated
- How to decrease the max file upload size without using php.ini or htaccess?
- Some problems in custom widget
- Checking page before applying image restrictions while uploading
- Change image data durgin upload
- Hook on file upload
- WordPress append -1 to the image name
- WordPress loading all local images from specific directory?
- unsharp thumbnails after uploading image
- wp_delete_attachment not working with multiple values
- Renaming “Expand Details” within “Add Media”
- Save the outputted image into the Media Library, with a different filename and extension
- How to resize an image server-side before upload?
- Missing Images in Uploads Directory (Server Only)
- Name Input from widget displays Sidebar name instead of saved data
- show/hide attachments
- Broken Media Library
- Can’t upload files
- Media Library is not loading on grid view in admin panel
- Blurry Images WordPress 5.8.1
- An automatic way to crop images of different sizes
- Generate and upload screenshot as featured image for user-submitted post
- Changing upload directory temporarily
- Restricting Image Upload Sizes using ‘wp_handle_upload_prefilter’ – Stuck media progress bar when Featured Image?
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one
- How to save WordPress post and attachment images from front end using media library?
- How to Protect Uploads, if User is not Logged In?
- How to Fix HTTP Error When Uploading Images?
- Extend Media Library
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- Reject upload of wrong-sized images using the Media Uploader
- How to make a image-size selected by default in Media upload – WP v3.5
- How to delete resized (cropped) image uploads and prevent future resizing?
- How to show all available images in WP’s media library when using the Polylang plugin?
- How do I change/modify the_post_thumbnail(); html output?
- What’s the best way to use the Featured Image for responsive web design?
- How to change upload directory in wp_handle_upload
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- How to add a class to the attachment images
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to wp_upload_bits() to a sub-folder?
- How do I hook into WordPress to save an uploaded photo as an alternate size to an existing photo?
- How to check if image is already stored in a site’s post database? (network)
- Change Media Uploader default directory
- Using Images in WordPress – Best Practices
- Media Upload Folder – how to manage
- How to hide media uploads by other users in the Media menu?