Bootenberg Blocks
any
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alawi8/bootenberg-blocks/archive/refs/heads/main.zipReadme
Bootenberg Blocks
Bootenberg Blocks is a powerful WordPress plugin that bridges the gap between the Gutenberg block editor and Bootstrap framework. It enables developers and content creators to craft responsive, dynamic, and visually appealing layouts effortlessly. With support for dynamic data rendering, it brings flexibility and design sophistication to WordPress websites.
Features
- Bootstrap Integration: Seamlessly load the latest version of Bootstrap to style your blocks and enhance layout responsiveness.
- Custom Gutenberg Blocks: Pre-built, Bootstrap-styled blocks ready to use in the Gutenberg editor.
- Dynamic Data Rendering: Populate blocks with data from WordPress posts, custom fields, or external APIs.
- User-Friendly Settings: Simple and intuitive block controls for content creators and developers alike.
- Lightweight Performance: Optimized to minimize impact on your site's speed.
Installation
-
Download and Install the Plugin:
- Download the
.zipfile from the repository. - Navigate to
Plugins > Add Newin your WordPress dashboard. - Upload the file and activate the plugin.
- Download the
-
Bootstrap Activation:
- Bootenberg Blocks automatically enqueues the latest Bootstrap CSS and JS files.
-
Start Using the Blocks:
- Open the Gutenberg editor and explore the new Bootenberg Blocks section.
How to Use Bootenberg Blocks
-
Adding a Block:
- Open the Gutenberg editor and select a block from the Bootenberg Blocks section:
- Grid Layout: Use Bootstrap's 12-column grid system.
- Card Block: Display content dynamically in a Bootstrap card.
- Button Block: Add buttons styled with Bootstrap.
- Open the Gutenberg editor and select a block from the Bootenberg Blocks section:
-
Dynamic Data Rendering:
- Use the block settings panel to configure dynamic content:
- Pull data from WordPress posts, custom fields (ACF), or API endpoints.
- Customize layout using Bootstrap utility classes.
- Use the block settings panel to configure dynamic content:
-
Styling Options:
- Add custom classes to further style blocks using Bootstrap’s CSS utilities.
Configuration
-
Bootstrap Version:
- Navigate to
Settings > Bootenberg Blocksto choose your desired Bootstrap version (e.g., 4.x, 5.x).
- Navigate to
-
Dynamic Content:
- Configure API endpoints or WordPress queries in the plugin settings to fetch data dynamically.
Developer Guide
Extending Bootenberg Blocks
Developers can extend the plugin by adding custom blocks or modifying existing ones.
-
Register Custom Blocks: Use the WordPress
registerBlockTypefunction to create blocks with Bootstrap styling. -
Dynamic Data: Use WordPress REST API or custom queries to fetch data for blocks.
-
Example Block Registration:
wp.blocks.registerBlockType('bootenberg/custom-block', { title: 'Custom Block', category: 'layout', attributes: { content: { type: 'string' } }, edit: ({ attributes, setAttributes }) => { return <div className="container">{attributes.content}</div>; }, save: ({ attributes }) => { return <div className="container">{attributes.content}</div>; } });