the_post_thumbnail_caption

Displays the post thumbnail caption.

Description

the_post_thumbnail_caption( (null) $post = null ); 

Parameters (1)

0. $post — Optional. (null) => null
Post ID or WP_Post object. Default is global $post..

Usage

  1. if ( !function_exists( 'the_post_thumbnail_caption' ) ) { 
  2. require_once ABSPATH . WPINC . '/post-thumbnail-template.php'; 
  3.  
  4. // Optional. Post ID or WP_Post object. Default is global `$post`. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = the_post_thumbnail_caption($post); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post-thumbnail-template.php  
  1. function the_post_thumbnail_caption( $post = null ) { 
  2. /** 
  3. * Filters the displayed post thumbnail caption. 
  4. * @since 4.6.0 
  5. * @param string $caption Caption for the given attachment. 
  6. */