Moo Digital Clickable Container
A WordPress block that wraps its content in a clickable link. Perfect for making entire card sections, cover blocks, or any container fully clickable.
by Moo Digital Ltd. · github.com/moo-digital/moo-digital-clickable-container · website
★ 0stars
0forks
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/moo-digital/moo-digital-clickable-container/archive/refs/heads/main.zipReadme
Moo Digital Clickable Container
A WordPress block that wraps its content in a clickable link. Perfect for making entire card sections, cover blocks, or any container fully clickable.
Features
- 🔗 Wrap any blocks in a clickable link
- 🎨 Supports all standard block styling (colours, spacing, typography)
- 🎯 "Open in new tab" option
- 📱 Fully responsive
- ♿ Accessibility-friendly (prevents nested links)
- 🎭 Visual indicator in the editor showing the link URL
Installation
Option 1: Build from source (Recommended for development)
- Copy the
moo-digital-clickable-containerfolder to your WordPress plugins directory - Navigate to the plugin folder in your terminal:
cd wp-content/plugins/moo-digital-clickable-container - Install dependencies:
npm install - Build the block:
npm run build - Activate the plugin in WordPress admin
Option 2: Pre-built (if you have the build folder)
- Copy the entire
moo-digital-clickable-containerfolder to your WordPress plugins directory - Activate the plugin in WordPress admin
Usage
- In the WordPress block editor, add a new block
- Search for "Clickable Container"
- Insert your content blocks inside the container (Cover blocks, images, text, etc.)
- In the block sidebar, add your link URL
- Optionally toggle "Open in new tab"
- Done! The entire container is now clickable
Tips
- Remove nested links: If you have "Learn more..." links inside your content, remove them to avoid nested anchor tags
- Styling: The container supports all standard block styling options (background colours, padding, margins, etc.)
- Use with Cover blocks: Perfect for making entire Cover blocks clickable (your original use case!)
Example Use Case
You have three Cover blocks showing services:
- Add a Clickable Container block
- Move your Cover block inside it
- Add the service page URL to the container
- Repeat for the other two services
- Now users can click anywhere on the card to visit that service
Development
Start development mode (with hot reload):
npm start
Build for production:
npm run build
Lint JavaScript:
npm run lint:js
Lint CSS:
npm run lint:css
Technical Details
- Built with
@wordpress/scripts - Uses React hooks and modern WordPress block API
- Follows WordPress coding standards
- Prevents nested
<a>tags automatically with CSSpointer-events: none
Browser Support
Works in all modern browsers that support WordPress Gutenberg editor.
License
GPL v2 or later
Author
Moo Digital Ltd. - https://moo.digital