Wikit Gutenberg Blocks Catalog
Overview
Wikit provides 49 custom Gutenberg blocks designed for building sophisticated WordPress sites. These blocks are located in /wikit-theme/block-editor/blocks/ and follow WordPress block API standards.
Block Categories
Query & Display Blocks
Advanced Query System
wdg/advanced-query- Advanced post query with faceted filteringwdg/advanced-query-facets- Container for query facetswdg/advanced-query-facet- Individual facet filterwdg/advanced-query-results- Query results displaywdg/advanced-query-pagination- Query pagination controlswdg/advanced-query-active- Active filters display
Card Display Blocks
wdg/card- Basic card componentwdg/card-dynamic- Dynamic content cardwdg/card-grid- Grid layout for cardswdg/card-slider- Carousel/slider for cardswdg/card-slider-content- Slider content areawdg/card-slider-description- Slider descriptionwdg/card-slider-nav- Slider navigation controlswdg/card-slider-query- Query-driven card sliderwdg/card-slider-related- Related content slider
Navigation Blocks
wdg/breadcrumb- Breadcrumb navigationwdg/aside-navigation- Sidebar navigation menuwdg/aside-navigation-item- Individual navigation itemwdg/header-navigation- Header navigation menuwdg/header-navigation-item- Header nav itemwdg/navigation- General navigation blockwdg/navigation-item- General nav item
Header & Layout Blocks
wdg/header- Page/post headerwdg/header-title- Header title componentwdg/header-meta- Header metadatawdg/header-metadata- Extended metadata displaywdg/panel- Content panel/sectionwdg/grid- Responsive grid layoutwdg/grid-item- Grid item container
Content Display Blocks
wdg/statistics- Statistics displaywdg/timeline- Timeline visualizationwdg/timeline-item- Timeline entrywdg/quote- Styled quotationwdg/cta- Call-to-action blockwdg/highlight- Highlighted contentwdg/csv- CSV data display/table
Media Blocks
wdg/media-slider- Media carouselwdg/media-slider-slide- Individual slidewdg/video-hero- Video hero section
People & Teams
wdg/people- People listing/gridwdg/person- Individual person displaywdg/person-header- Person header/bio
Search & Forms
wdg/search- Search interfacewdg/search-modal- Modal search overlay
Dynamic Content
wdg/query- Basic post querywdg/single-dynamic- Dynamic single post contentwdg/nav-list- Dynamic navigation listwdg/nav-list-child- Child navigation itemswdg/post-tease- Post teaser/excerptwdg/posts- Posts listing
Using Wikit Blocks
In the Block Editor
All Wikit blocks are available in the block inserter under the "WDG" category:
- Click the "+" button in the editor
- Search for "wdg/" or browse the WDG category
- Insert the desired block
- Configure block settings in the sidebar
Block Patterns
Common block combinations can be saved as patterns:
php
register_block_pattern(
'wdg/product-showcase',
[
'title' => 'Product Showcase',
'categories' => ['wdg-patterns'],
'content' => '<!-- wp:wdg/header --><!-- /wp:wdg/header -->
<!-- wp:wdg/card-slider-query {"postType":"product"} /-->'
]
);Programmatic Usage
php
// Render a block programmatically
echo do_blocks('<!-- wp:wdg/breadcrumb /-->');
// Or use render_block
$block = [
'blockName' => 'wdg/card',
'attrs' => [
'title' => 'Dynamic Card',
'content' => 'Card content',
],
];
echo render_block($block);Block Configuration
Common Block Attributes
Most Wikit blocks support these common attributes:
className- Additional CSS classesalign- Alignment (wide, full, left, right, center)backgroundColor- Background color from themetextColor- Text color from theme
Query Block Attributes
Query-based blocks (advanced-query, card-slider-query, etc.) support:
postType- Post type to querytaxonomy- Taxonomy for filteringterms- Specific terms to filter byposts_per_page- Number of postsorderby- Sort fieldorder- Sort direction (ASC/DESC)
Example: Advanced Query with Facets
html
<!-- wp:wdg/advanced-query {"postType":"product"} -->
<!-- wp:wdg/advanced-query-facets -->
<!-- wp:wdg/advanced-query-facet {"taxonomy":"product_category"} /-->
<!-- wp:wdg/advanced-query-facet {"taxonomy":"product_tag"} /-->
<!-- /wp:wdg/advanced-query-facets -->
<!-- wp:wdg/advanced-query-results -->
<!-- wp:wdg/card-grid -->
<!-- wp:wdg/card-dynamic /-->
<!-- /wp:wdg/card-grid -->
<!-- /wp:wdg/advanced-query-results -->
<!-- wp:wdg/advanced-query-pagination /-->
<!-- /wp:wdg/advanced-query -->Extending Blocks
Adding Block Styles
php
// Register additional block style
register_block_style(
'wdg/card',
[
'name' => 'outlined',
'label' => 'Outlined',
'style_handle' => 'wdg-card-outlined-style',
]
);Modifying Block Output
php
add_filter('render_block_wdg/card', function($block_content, $block) {
// Modify card block output
if (isset($block['attrs']['customAttribute'])) {
// Add custom handling
}
return $block_content;
}, 10, 2);Project-Specific Blocks
Projects can add their own blocks:
Create block in project repository:
/projects/{project}/repositories/{repo}/blocks/custom-block/ ├── block.json ├── index.js ├── editor.scss └── style.scssRegister in theme/plugin:
phpregister_block_type(__DIR__ . '/blocks/custom-block');
Block Development
Block Structure
Each Wikit block follows this structure:
block-name/
├── block.json # Block metadata
├── index.js # Block JavaScript
├── editor.scss # Editor styles
├── style.scss # Frontend styles
└── render.php # Optional PHP renderingBlock.json Example
json
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "wdg/block-name",
"title": "Block Title",
"category": "wdg",
"icon": "dashicon-name",
"description": "Block description",
"supports": {
"html": false,
"align": ["wide", "full"]
},
"attributes": {
"content": {
"type": "string",
"source": "html",
"selector": ".content"
}
},
"editorScript": "file:./index.js",
"editorStyle": "file:./editor.css",
"style": "file:./style.css"
}Best Practices
- Use Wikit blocks when available - Don't reinvent existing functionality
- Follow naming conventions - Use
wdg/prefix for custom blocks - Support theme colors - Use theme color palette in block settings
- Make blocks reusable - Design blocks to work in multiple contexts
- Test responsiveness - Ensure blocks work on all screen sizes
- Document custom blocks - Add clear descriptions and usage examples