Skip to content
Sign in
FoA Featured Image – Show Caption icon

FoA Featured Image – Show Caption

Adds caption functionality to Featured Image blocks with a simple toggle setting, live editor preview, and alignment controls.

Not scanned yet WordPress plugin 30 installs

Install in

No install steps yet

Follow the steps on the source page.

FoA Featured Image – Show Caption extends the core Featured Image block (core/post-featured-image) with caption functionality. When enabled, it displays the image caption (with an optional fallback to the image title) below the featured image using semantic <figcaption> markup.

Key Features:

  • Adds a “Show Caption” toggle to the Featured Image block inspector
  • Live caption preview right inside the Block Editor and Site Editor
  • Optional “Fallback to image title” toggle (enabled by default)
  • Caption alignment control (Right, Left, Center, or Theme default / inherit)
  • Semantic <figcaption class="featured-image-caption wp-element-caption"> markup that works cleanly with linked featured images and theme.json caption styles
  • Supports safe inline HTML in captions (such as photo credit links) via wp_kses_post()
  • Works in posts, pages, Site Editor templates, and Query Loop blocks
  • Conditional frontend CSS loading (only enqueued when a caption is rendered)
  • Accessible theme-adaptive default styling with low specificity

Developer Filters:

  • foafic_featured_image_caption_text — Filter the caption text before sanitization
  • foafic_featured_image_caption_html — Filter the final <figcaption> HTML markup

Written by Joobi from the project's own listing. See the source page

blockscaptionfeatured imagegutenberg
26 Nov 2026
Version 1.1.0 released. Not scanned yet.

1.1.0

  • Confirmed compatibility with WordPress 7.2 and PHP 8.6
  • Switched caption markup to semantic <figcaption class="featured-image-caption wp-element-caption">
  • Fixed HTML nesting when “Link to post” is enabled on the Featured Image block
  • Fixed regex backreference corruption when captions contain $ or \ characters
  • Fixed post context resolution inside Query Loop blocks using $instance->context['postId']
  • Added live caption preview inside the Block Editor and Site Editor
  • Added “Fallback to image title” toggle (defaults to on for backward compatibility)
  • Added “Caption alignment” selector (Right, Left, Center, Theme default)
  • Allowed safe inline HTML in captions via wp_kses_post() and added foafic_featured_image_caption_text / foafic_featured_image_caption_html filters
  • Enqueued frontend stylesheet conditionally only when a caption is actually rendered
  • Improved default caption contrast (color: inherit; opacity: 0.75) for light and dark themes
  • Migrated editor script build to @wordpress/scripts, removed deprecated wp-editor dependency, fixed editor Fragment wrapper, and added JS script translations
  • Synced repository and fixed undefined constant / array key typos

1.0.0

  • Initial release
  • Added Show Caption toggle to Featured Image blocks
  • Displays image caption or title below featured image
  • Works with Gutenberg block editor and templates
  • Right-aligned caption styling with light grey color
2 Oct 2025Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)