-
-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Blocks
Aegis extends the WordPress block editor with custom blocks designed for common website needs. These blocks are built with the same architecture as WordPress core blocks and integrate seamlessly with the editor experience.
| Block | Namespace | Source | Description |
|---|---|---|---|
| Countdown | aegis/countdown |
Theme | Animated countdown timer to a target date. |
| Slider | aegis/slider |
Theme | A carousel container for sliding content. |
| Slide | aegis/slide |
Theme | An individual slide within a Slider block. |
| Toggle | aegis/toggle |
Theme | An expandable/collapsible content wrapper (accordion). |
| Toggle Content | aegis/toggle-content |
Theme | The content area within a Toggle block. |
| Video | aegis/video |
Theme | Enhanced video embed with performance optimizations. |
| Related Posts | aegis/related-posts |
Theme | Displays posts related to the current content. |
| Map | aegis/map |
Plugin | Interactive map embed. |
| Modal | aegis/modal |
Plugin | Popup/overlay dialog triggered by user interaction. |
Note: The Map and Modal blocks require the free Aegis Plugin to be installed. They are not part of the theme itself.
The Countdown block displays an animated timer counting down to a specified date and time.
- Configurable target date and time.
- Displays days, hours, minutes, and seconds.
- Customizable labels for each unit.
- Animated digit transitions.
- Expiry message when the countdown reaches zero.
- Responsive layout adapts to available space.
- Insert the Countdown block from the block inserter.
- Set the Target date in the block settings sidebar.
- Optionally customize unit labels (for example, "Days" vs "D").
- Set an expiry message that displays after the countdown ends.
- Style with color, typography, and spacing controls.
- Product launch countdowns
- Event start timers
- Sale or promotion deadlines
- Limited-time offers
The Slider block creates a horizontal carousel that cycles through its child Slide blocks.
- Automatic and manual slide advancement.
- Configurable autoplay interval.
- Navigation arrows and dot indicators.
- Swipe support on touch devices.
- Infinite loop option.
- Accessible keyboard navigation.
- Customizable transition effects.
- Insert the Slider block.
- Add Slide blocks inside it (one per slide).
- Build each slide content using any combination of blocks.
- Configure slider options in the block settings:
- Autoplay on/off and interval.
- Show/hide navigation arrows.
- Show/hide dot indicators.
- Loop behavior.
The Slide block is a container for individual slide content within a Slider block.
- Full block editor support for slide content.
- Background color and image settings.
- Overlay options for text readability.
- Alignment and sizing controls.
Slide blocks can only be inserted as direct children of a Slider block. Each Slide can contain any arrangement of blocks — text, images, buttons, and more.
The Toggle block creates expandable and collapsible content sections, commonly known as accordions.
- Click-to-expand interaction.
- Customizable toggle header text and styling.
- Animated open/close transitions.
- Multiple toggles can be used together for FAQ-style layouts.
- Option for exclusive behavior (only one open at a time) when used in a group.
- Accessible ARIA attributes for screen readers.
- Insert the Toggle block.
- Enter the toggle header text (the always-visible clickable area).
- Add content blocks inside the Toggle Content area.
- Configure whether the toggle starts open or closed.
- Repeat for additional toggle items.
- FAQ sections
- Expandable documentation
- Product specification details
- Collapsible navigation sections
The Toggle Content block is the expandable area within a Toggle block. It contains the content that is shown or hidden when the toggle header is clicked.
This block is automatically inserted as part of a Toggle block and cannot be used independently.
The Video block provides an enhanced video embedding experience with performance optimizations.
- Lazy loading (video does not load until interaction).
- Facade/thumbnail display before playback (reduces page weight).
- Support for self-hosted videos and external sources.
- Customizable poster/thumbnail image.
- Play button overlay styling.
- Responsive aspect ratio handling.
- Accessible playback controls.
- Insert the Video block.
- Enter the video URL or upload a video file.
- Set a poster image (thumbnail displayed before playback).
- Configure playback options (autoplay, loop, muted, controls).
- The block displays a lightweight facade until the visitor clicks play.
The Video block uses a facade pattern that:
- Displays a static image instead of loading the full video player.
- Only initializes the video player when the visitor clicks play.
- Eliminates multiple HTTP requests for video player scripts on page load.
The Related Posts block dynamically displays posts related to the current content based on shared categories and tags.
- Automatic relevance matching via taxonomy relationships.
- Configurable number of posts to display.
- Layout options (grid, list, or cards).
- Customizable post information display (title, excerpt, date, thumbnail).
- Fallback behavior when no related posts exist.
- Excludes the current post from results.
- Insert the Related Posts block (typically in a single post template).
- Configure the number of posts to display.
- Choose the layout style.
- Select which post metadata to show.
- Set fallback content for when no related posts are found.
The Map block embeds an interactive map into your content. This block requires the free Aegis Plugin.
- Multiple map providers support.
- Custom marker placement.
- Configurable zoom level and center point.
- Responsive sizing.
- Lazy loading for performance.
- Style customization.
- Install and activate the Aegis Plugin.
- Insert the Map block.
- Set the map center coordinates or address.
- Configure zoom level and map style.
- Add markers as needed.
The Modal block creates popup dialogs triggered by user interaction. This block requires the free Aegis Plugin.
- Trigger via button click, timer, or scroll position.
- Customizable overlay and dialog styling.
- Close button and outside-click dismissal.
- Animation options for open/close.
- Full block editor support for modal content.
- Accessible focus trapping and ARIA attributes.
- Install and activate the Aegis Plugin.
- Insert the Modal block.
- Configure the trigger method.
- Build the modal content using any blocks.
- Style the overlay and dialog container.
| Block | Requires |
|---|---|
| Countdown | Aegis theme only |
| Slider / Slide | Aegis theme only |
| Toggle / Toggle Content | Aegis theme only |
| Video | Aegis theme only |
| Related Posts | Aegis theme only |
| Map | Aegis Plugin (free) |
| Modal | Aegis Plugin (free) |
- enhanced-core-blocks — Core blocks with added Aegis functionality.
- block-variations — Custom variations of WordPress core blocks.
- block-patterns — Pre-built layouts using these blocks.
- conditional-logic — Control block visibility with conditions.
Aegis version 1.0.0 | GitHub Repository | Report an Issue | Atmostfear Entertainment
License: GPL-2.0-or-later