How to call the Caption function in Wordpress media files

Hello.

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

Thanks

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,
Bob

1 Like

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