Card

Renders template-parts/molecules/card in its image and text-only variants.

Playground

Change a value below to update the preview live.

Usage

With image

get_template_part( 'template-parts/molecules/card', null, [
    'title'           => 'Card Title',
    'image'           => 123, // WP attachment ID
    'image_ratio'     => '16/9', // optional, default '4/3'
    'content'         => 'Supporting body copy for the card.',
    'link_url'        => 'https://example.com',
    'link_text'       => 'View Project',
    'link_aria_label' => '', // optional — auto-derived from link_text + title if omitted
    'heading_level'   => 'h3', // h2 | h3 | h4, default h3
] );

Text only (news / press style)

get_template_part( 'template-parts/molecules/card', null, [
    'title'         => 'Article headline goes here',
    'content'       => 'Supporting body copy for the card.',
    'date'          => 'March 17, 2026',
    'eyebrow'       => 'Press Release',
    'link_url'      => 'https://example.com',
    'link_text'     => 'Read More',
    'heading_level' => 'h3',
] );