Component Registry Test

Enravo Base Theme - All Registered Components

8 components registered

Registered Components (from API)

API Endpoint: /wp-json/enravo/v1/registry

Sections

enravo/hero enravo/product-grid enravo/cta-banner enravo/blog-list

Cards

enravo/product-card enravo/post-card

Headers

enravo/header-shop

Footers

enravo/footer-default

Section Components

enravo/hero

Hero Section - Full-width banner with CTA

variant: centered

Welcome to Enravo Shop

Context-aware component architecture for modern WordPress themes.

enravo/product-grid

Product Grid - Display products with context-aware configuration

context: homepage_featured

Featured Products

enravo/product-grid

Same component, different context

type: sale, context: homepage_sale

On Sale Now

enravo/cta-banner

Call-to-action banner section

variant: highlight

Subscribe to Our Newsletter

Get the latest updates and exclusive offers directly in your inbox.

enravo/blog-list

Display blog posts in grid format

limit: 3, columns: 3

Latest Blog Posts

View All
Genel

Balın Sağlığa 6 Faydası

Balın faydaları antik çağlardan beri lanse ediliyor ve eski Yunanlılar ile Romalıların bir şeyin farkında olduğu ortaya çıktı: Bal, sağlığımız…

Genel

Gerçek Bal Nasıl Anlaşılır?

Saf Bal Nedir? Gerçek bal fabrikalarda değil arılardan üretilir. Genellikle organik ve doğal ballara saf bal denir. Ancak balın saf olup olmadığını…

Genel

KRİSTALİZE BAL NASIL ERİTİLİR(Çözülür)

BALIN KRİSTALLEŞMESİNİ NASIL ÖNLEYEBİLİRİM? Balı nerede sakladığınız, ne kadar hızlı kristalleşeceği konusunda büyük bir fark yaratabilir. Düşük sıcaklıklar daha hızlı kristalleşmeyi…

Module Components (from Plugins)

Plugin Components: Bu component'ler harici plugin'lerden register edilmiştir. Tema API'si üzerinden görünür ve headless tarafta da kullanılabilir.
enravo/branch-list: Bu component enravo-sube plugin'inden geliyor. Plugin'i aktif edin veya veritabanında şube verisi olduğundan emin olun.

Card Components

enravo/product-card

Single product card

enravo/post-card

Single blog post card

Genel

Balın Sağlığa 6 Faydası

Balın faydaları antik çağlardan beri lanse ediliyor ve eski Yunanlılar ile Romalıların bir şeyin farkında olduğu ortaya çıktı: Bal, sağlığımız…

Component Schema Reference

enravo/hero

Full-width hero banner with title, description, and CTA

sections
Props
title: string description: string image: string image_id: number variant: string show_cta: boolean cta_text: string cta_url: string cta_secondary_text: string cta_secondary_url: string
Variants
default centered minimal
Presets
homepage

enravo/product-grid

Display products in a responsive grid layout

sections
Props
title: string type: string limit: number columns: number category_id: number product_ids: array variant: string context: string show_all_link: boolean all_link_text: string all_link_url: string
Variants
default compact featured
Presets
homepage_featured homepage_sale sidebar_recent

enravo/product-card

Single product card for grids and carousels

cards
Props
product: object product_id: number variant: string show_badge: boolean show_rating: boolean show_price: boolean show_cart: boolean show_category: boolean
Variants
default compact featured horizontal

enravo/cta-banner

Call-to-action banner section

sections
Props
title: string description: string cta_text: string cta_url: string variant: string background: string
Variants
default highlight minimal

enravo/blog-list

Display blog posts in grid or list format

sections
Props
title: string limit: number columns: number category_id: number variant: string show_excerpt: boolean show_date: boolean show_author: boolean
Variants
default compact featured

enravo/header-shop

E-commerce header with logo, search, cart, and account

headers
Props
sticky: boolean show_search: boolean show_cart: boolean show_account: boolean variant: string
Variants
default centered minimal

enravo/footer-default

Standard footer with widgets and copyright

footers
Props
show_widgets: boolean show_copyright: boolean copyright_text: string variant: string
Variants
default

enravo/post-card

Single blog post card for archives and grids

cards
Props
post_id: number show_excerpt: boolean show_date: boolean show_category: boolean show_author: boolean thumbnail_size: string variant: string
Variants
default compact horizontal

UI Elements

Buttons

Badges

Sale Featured New Out of Stock

Alerts

Success! Operation completed successfully.
Warning! Please review before proceeding.
Error! Something went wrong.
Info: Helpful information message.

Icons

menu

close

cart

search

user

chevron-down

arrow-up

Color Palette

--erv-color-primary

--erv-color-secondary

--erv-color-success

--erv-color-warning

--erv-color-error

--erv-color-info

--erv-color-text

--erv-color-text-muted

--erv-color-surface

--erv-color-border

Usage Examples

Render Component in Template

<?php
use Enravo\Theme\Core\ComponentRegistry;

// Render hero section
ComponentRegistry::render( 'enravo/hero', [
    'title'    => 'Welcome',
    'variant'  => 'centered',
    'show_cta' => true,
] );

// Render product grid with preset
ComponentRegistry::render( 'enravo/product-grid', [
    'preset' => 'homepage_featured',
] );
?>

Add Custom Component (Child Theme)

// functions.php
add_action( 'enravo_register_components', function() {
    \Enravo\Theme\Core\ComponentRegistry::register( 'enravo/custom-banner', [
        'name'     => 'Custom Banner',
        'category' => 'sections',
        'path'     => 'sections/custom-banner',
        'props'    => [
            'title' => [ 'type' => 'string', 'default' => '' ],
            'image' => [ 'type' => 'string', 'default' => '' ],
        ],
    ]);
}, 20 );

// Then create: components/sections/section-custom-banner.php

Add Preset to Existing Component

// functions.php
add_action( 'enravo_core_components_registered', function() {
    \Enravo\Theme\Core\ComponentRegistry::add_preset( 'enravo/product-grid', 'my_custom', [
        'type'    => 'featured',
        'limit'   => 6,
        'columns' => 3,
    ]);
}, 20 );

// Usage:
ComponentRegistry::render( 'enravo/product-grid', [ 'preset' => 'my_custom' ] );