The AZBlocks Modular Modal plugin is a modal window component that includes a form and can be added to any WordPress theme that integrated Advanced Custom Fields (ACF).
Key Features:
- Button: A button that, when clicked, opens a modal window containing a form. Style this button the same as the submit button in the form in the modal window
- Modal Window: Styled to match the Figma design, including form layout and text elements
- ACF Integration: Use ACF to control the following:
- Button Text
- Button Link
- Boolean toggle to enable/disable the modal window
- Modal form title text
Automatic Installation:
- In your WordPress admin dashboard, navigate to Plugins > Add New
- Search for "azblocks-modular-modal"
- Click "Install Now" and then "Activate"
Manual Installation:
- Download the plugin files
- Upload the
azblocks-modular-modalfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' screen in WordPress
Requirements:
- WordPress 6.0 or higher
- PHP 7.4 or higher
- Advanced Custom Fields (ACF) plugin (recommended for full functionality)
Post-Installation Setup:
- Ensure ACF is installed and activated for the best experience
- The plugin will automatically register ACF field groups for modal content
- Start using the "Modal Button" block in the Gutenberg editor
Basic Usage:
-
Adding Modal Buttons in Gutenberg Editor:
- In the block editor, search for "Modal Button" block
- Add the block to your post or page
- Configure button text, modal title, and content
- Publish your content
- Initial release
- Custom Gutenberg block for modal buttons
- ACF integration for content management
- Template-based architecture
- Accessible modal implementation
- Theme integration support
- Hooks and filters for customization
Building the Plugin:
The plugin uses WordPress Scripts for building. To modify and build:
- Clone the repository
- Run
npm installto install dependencies - Run
npm run startfor development with hot reload - Run
npm run buildfor production build
File Structure:
/src/- Source files for the block/build/- Compiled block assets/inc/- PHP includes and functionality/template-parts/- Template files for modal rendering/acf-json/- ACF field group definitions


