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
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
enravo/blog-list
Display blog posts in grid format
limit: 3, columns: 3
Latest Blog Posts
View All
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…
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ı…
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)
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
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
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
Presets
enravo/product-grid
Display products in a responsive grid layout
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
Presets
enravo/product-card
Single product card for grids and carousels
Props
product: object
product_id: number
variant: string
show_badge: boolean
show_rating: boolean
show_price: boolean
show_cart: boolean
show_category: boolean
Variants
enravo/cta-banner
Call-to-action banner section
Props
title: string
description: string
cta_text: string
cta_url: string
variant: string
background: string
Variants
enravo/blog-list
Display blog posts in grid or list format
Props
title: string
limit: number
columns: number
category_id: number
variant: string
show_excerpt: boolean
show_date: boolean
show_author: boolean
Variants
enravo/header-shop
E-commerce header with logo, search, cart, and account
Props
sticky: boolean
show_search: boolean
show_cart: boolean
show_account: boolean
variant: string
Variants
enravo/footer-default
Standard footer with widgets and copyright
Props
show_widgets: boolean
show_copyright: boolean
copyright_text: string
variant: string
Variants
enravo/post-card
Single blog post card for archives and grids
Props
post_id: number
show_excerpt: boolean
show_date: boolean
show_category: boolean
show_author: boolean
thumbnail_size: string
variant: string
Variants
UI Elements
Buttons
Badges
Alerts
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' ] );