Skip to content

Block patterns

The theme registers 20 block patterns under the Dankcave category. They're the building blocks of every content page.

Find them in the block editor: click +PatternsDankcave.

Composing a page

  1. Pages → Add New

  2. Title the page

  3. Right sidebar → TemplateLanding (full-bleed)

  4. Top-right menu → Code editor

  5. Paste one or more pattern references:

    <!-- wp:pattern {"slug":"dankcave/about-hero"} /-->
    <!-- wp:pattern {"slug":"dankcave/commitment-split"} /-->
    <!-- wp:pattern {"slug":"dankcave/why-choose-cards"} /-->
  6. Switch to Visual editor to preview

  7. Publish

Catalog

Home patterns

SlugRenders
dankcave/heroDisplay headline + product silhouette + CTA + wine watermark
dankcave/section-headerEyebrow + H2 + optional right-side link
dankcave/category-showcase5-cell asymmetric category grid
dankcave/editorial-bandDark campaign section
dankcave/product-row4-product horizontal row
dankcave/blog-row3-post Query Loop
dankcave/stats-row4-stat trust-signal counters
dankcave/newsletter-bandDark newsletter signup section

About page patterns

SlugRenders
dankcave/about-heroAbout page hero
dankcave/commitment-splitNarrative left + 2×2 category grid right
dankcave/why-choose-cards3-column reason cards
dankcave/customer-satisfactionDark band with 4 stats + support CTA
dankcave/community-ctaDark CTA with brand logo + dual buttons
SlugRenders
dankcave/contact-splitContact form + FAQ + support details
dankcave/page-shippingFull shipping policy content
dankcave/page-returnsFull returns policy content
dankcave/page-privacyFull privacy policy content
dankcave/page-termsFull terms of service content

Generic

SlugRenders
dankcave/content-heroGeneric interior page hero
dankcave/black-cta-bandFull-width dark CTA band

Recipes

"Deals" landing

<!-- wp:pattern {"slug":"dankcave/content-hero"} /-->
<!-- wp:pattern {"slug":"dankcave/section-header"} /-->
<!-- wp:pattern {"slug":"dankcave/product-row"} /-->
<!-- wp:pattern {"slug":"dankcave/black-cta-band"} /-->

Brand story page

<!-- wp:pattern {"slug":"dankcave/about-hero"} /-->
<!-- wp:pattern {"slug":"dankcave/commitment-split"} /-->
<!-- wp:pattern {"slug":"dankcave/why-choose-cards"} /-->
<!-- wp:pattern {"slug":"dankcave/customer-satisfaction"} /-->
<!-- wp:pattern {"slug":"dankcave/community-cta"} /-->

FAQ / help center

<!-- wp:pattern {"slug":"dankcave/content-hero"} /-->
<!-- wp:pattern {"slug":"dankcave/contact-split"} /-->

Adding a new pattern

  1. Create the pattern file at theme/patterns/my-pattern.php. Return either a string of static blocks or a dynamic <!-- wp:html --><section>...</section><!-- /wp:html --> wrapper for PHP data.
  2. Register it in theme/inc/block-patterns.php under the dankcave category.
  3. Style it in theme/assets/css/theme.css scoped to .pattern-{name}.
  4. Clear Autoptimize after upload.

Gotcha: register_block_pattern() uses require, running the pattern PHP in the caller's scope. Wrap dynamic patterns in an IIFE so loop variables don't leak.

Dankcave theme v0.2.2