post_excerpt is actually the caption attribute. Here is the correct answer:
$title = get_post(get_post_thumbnail_id())->post_title; //The Title
$caption = get_post(get_post_thumbnail_id())->post_excerpt; //The Caption
$description = get_post(get_post_thumbnail_id())->post_content; // The Description
Related Posts:
- Set Featured Image for Archive templates
- How can I add a set featured image function to a theme that doesn’t already have it built in?
- Can I apply a WP theme to a specific custom page template?
- Can I create multiple instances of the BuddyPress Activity Stream with separate themes? [closed]
- How do you get thumbnails to show up in the admin edit post?
- How to use get_page_by_title() with qTranslate?
- Display a specific dynamic sidebar widgets on a specific page
- 100% width Featured Image Size
- Multi-level page hierarchy
- Own Theme Customizer displays error message when saving, saving still works
- Customizing page content layout
- Putting two themes together to create a complete site
- Featured images, am I missing something?
- Make multiple pages and set template/content on theme activation?
- How to restore file or theme?
- How to transform a custom made static HTML website to a WordPress website [closed]
- Recommended Media Size for Twenty Fourteen
- get_the_post_thumbnail() produces different HTML on same arguments
- How to edit the font color of the H1 on a single page?
- How to use custom page templates in a theme that hides page template option?
- Setting a new default template for the creation of a page
- Index page is not working
- Migrating a website using custom image tags to use featured images instead
- Custom theme – pages in menu
- remove preloader in WordPress theme [closed]
- How do I get the featured image to sit below the header in the twenty nineteen theme?
- Custom CSS is overwritten by WordPress?
- Edit box-header on WordPress Dashboard
- Featured images are cropped on index and post page
- Change theme’s thumbnail to cropped WP featured image
- Theme stops media uploader from working
- adding a unique page to an existing site
- separate home page into separate pages
- wordpress template page Usage [duplicate]
- How to create an Single-Portfolio page?
- Featured image on page is not displayed with certain theme: how to debug this?
- Starter Theme vs Parent Theme? Pros and cons
- When cropping a header image, retain meta data (i.e. name, description, etc.) from original image?
- How to create a new theme from scratch?
- How do you change the theme location?
- How to see files in directories in “Edit Themes” screen
- How can I check for malware in a Theme? [closed]
- Theme of codinghorror.com
- Weird post pagination url redirect
- Download WordPress.com theme: how?
- Can I rename a theme’s folder and still receive updates?
- Child theme not visible
- Custom theme folder
- Help with WordPress Query
- Are theme .php files stored in the database?
- Inject widgets from one sidebar into another with PHP
- Execute filter in theme as last
- Why style.css with ?ver=3.9.2 not updating as the one without ?ver=3.9.2?
- An unexpected error occurred. Something may be wrong with WordPress.org
- Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10)
- (FES EDD) New vendor submission page is blank
- Website redesign – New theme – Help needed
- ‘Add New’ button not present [closed]
- How to style the post previews/links without it affecting the main posts?
- Buddypress User Settings template location? [closed]
- How to code static pages in WordPress
- Theme, WordPress Version, MySQL Version, PHP Version Update affected files and folders
- Can “Classic Editor” plugin help to replicate the old website / theme development experience from c. 2011?
- How to display footer menus in wordpress
- Color Options from Theme Customizer API not returning via get_theme_mod()
- Debugging in WordPress at Theme installation [duplicate]
- understanding theme hierarchy
- wp_enqueue_style $dep argument does nothing?
- Posts as filtered list – expandable
- Is it a good practice to disable wpautop for premium themes?
- How to remove current theme customizations
- Create QuickStart Package for WordPress just like in Joomla
- How to include stylesheet in custom admin using parent_slug
- After installing a free theme, my wordpress turns into text mode when accessing remotely
- Jquery Theme Roller to WordPress
- why is this script not working on my site
- is theme network enabled?
- Pharmacare theme login page / login modal redirection to custom URL
- theme installation not working
- wordpress-theme 2017: featured image behaviour: where to set the height of the featured image?
- Changing a parent theme safely
- Trying to create a child theme with plugin
- Theme-based character encoding issue
- Linkedin not returning right info
- how to load rtl.css file before style.css [duplicate]
- CSS/JS is not working in multi lang installation
- Error while downloading WordPress themes
- How get the 10 most viewed pages (not post)
- Create a live demo gallery for themes
- Satoshi WordPress Theme – Portfolio SetUp Issues
- How to make only selected posts appear on a selected wordpress page
- Page structure using The Customizer Api
- theme 2016 – customize css – nothing happens
- Can’t upload the theme
- Installing themes from an external website [closed]
- Best Practice Jumbotron Image for WordPress ~ Responsive
- How to make a page extend full screen [closed]
- Should you directly edit Template Parts and Templates from themes?
- I added a rating system on my blog post but instead of stars it shows boxes
- WordPress Editor Missing Padding and Background Color?