Media · Gutenberg

Photo Card block for WordPress

A styled media card with a prominent photo, category tag, title, excerpt, and meta information.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

A styled media card with a prominent photo, category tag, title, excerpt, and meta information.

Inspector panels on this block: Content, Meta, Layout. Those titles come from index.js, not from a shared template.

Behavior controls: “Aspect Ratio” options: 16 / 9, 4 / 3, 3 / 2, 1 / 1, 2 / 1; “Layout” options: Vertical (image top), Horizontal (image side); “Image Side” options: Left, Right.

Photo Card has no render.php and no frontend.js. The saved Gutenberg HTML is what visitors see, plus Blockenberg layout/typography CSS.

Where to find it

Gutenberg inserter → Media → search “Photo Card” (block name `blockenberg/photo-card` in block.json). Style it in the sidebar after insert.

How to use Photo Card block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Photo Card”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Content. Set “Image URL”, “Image Alt”, “Aspect Ratio”, “Show Category”.
  4. Publish. Save the page. Output is the saved block HTML; typography/colors follow Blockenberg shared panels.

Inspector controls from this block’s code

ControlWhat the code does
Image URLText field in the inspector. Saved as `imageUrl`.
Image AltText field in the inspector. Saved as `imageAlt`.
Aspect RatioSelect control; the chosen value is saved on the block. Options: 16 / 9; 4 / 3; 3 / 2; 1 / 1; 2 / 1. block.json default: 16/9. Saved as `aspectRatio`.
Show CategoryOn/off toggle in the inspector. On by default. Saved as `showCategory`.
CategoryText field in the inspector. block.json default: Technology. Saved as `category`.
Content — TitleText field in the inspector. block.json default: The Future of Web Development Starts Today. Saved as `title`.
Show ExcerptOn/off toggle in the inspector. On by default. Saved as `showExcerpt`.
ExcerptText field in the inspector. block.json default: Explore how modern tooling, AI-assisted coding, and component-driven design are reshaping the way we build for the web.. Saved as `excerpt`.
Show AuthorOn/off toggle in the inspector. On by default. Saved as `showAuthor`.
AuthorText field in the inspector. block.json default: Alex Morgan. Saved as `author`.
Show DateOn/off toggle in the inspector. On by default. Saved as `showDate`.
DateText field in the inspector. block.json default: 25 Feb 2026. Saved as `date`.
Show Read TimeOn/off toggle in the inspector. On by default. Saved as `showReadTime`.
Read TimeText field in the inspector. block.json default: 5 min read. Saved as `readTime`.
Show LinkOn/off toggle in the inspector. On by default. Saved as `showLink`.
Link URLText field in the inspector. Saved as `linkUrl`.
Link TextText field in the inspector. block.json default: Read article →. Saved as `linkText`.
LayoutSelect control; the chosen value is saved on the block. Options: Vertical (image top); Horizontal (image side). block.json default: vertical. Saved as `layout`.
Image SideSelect control; the chosen value is saved on the block. Options: Left; Right. block.json default: left. Saved as `imageSide`.
Border RadiusNumeric range control in the inspector. Range 0–32. block.json default: 14. Saved as `borderRadius`.
Content PaddingNumeric range control in the inspector. Range 12–56. block.json default: 20. Saved as `padding`.
Page BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `bgColor`.
Card BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `cardBg`.
Colors — BorderColor control in the inspector. block.json default: #e5e7eb. Saved as `borderColor`.
Colors — TitleColor control in the inspector. block.json default: #111827. Saved as `titleColor`.
Body TextColor control in the inspector. block.json default: #6b7280. Saved as `textColor`.
Meta TextColor control in the inspector. block.json default: #9ca3af. Saved as `metaColor`.
Category BackgroundColor control in the inspector. block.json default: #6366f1. Saved as `categoryBg`.
Category TextColor control in the inspector. block.json default: #ffffff. Saved as `categoryColor`.
LinkColor control in the inspector. block.json default: #6366f1. Saved as `linkColor`.
Image PlaceholderColor control in the inspector. block.json default: #e5e7eb. Saved as `imagePlaceholderBg`.

When this is the right block

Notes from the implementation

Static block: markup is saved in post content; no PHP render callback in this folder.

FAQ

How do I add the Photo Card block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Photo Card”. It sits under Media. After insert, open Content and set “Image URL”, “Image Alt”, “Aspect Ratio”, “Show Category”.

What makes Photo Card different from other Blockenberg blocks?

A styled media card with a prominent photo, category tag, title, excerpt, and meta information. Inspector labels on this block include “Image URL”, “Image Alt”, “Aspect Ratio”, “Show Category”.

Is the Photo Card Gutenberg block free?

Yes. Photo Card ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Photo Card to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Meta, Layout).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Photo Card from the Gutenberg inserter.

Get Blockenberg