How to call the Caption function in Wordpress media files


With which Wordpress Action can I call the text Caption of an image?


Hi @Mickael,
I don’t think that Pinegrow has a built-in action for that, so you will have to use a custom PHP block action instead. The function should be wp_get_attachment_caption( $post_id );.
Good Luck,

Hi @RobM ,
Thanks for your suggest. It’s Work.

For a single.php page i use :

wp_get_attachment_caption( $featuredID = get_post_thumbnail_id() );

Have a Good day