WP Hero Block
A custom Gutenberg block for creating a Hero section with image or video background.
★ 1stars
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/code-mat/wp-hero-block/archive/refs/heads/main.zipReadme
WP Hero Block
A custom Gutenberg block for WordPress that renders a Hero section with:
- Background image or video
- H1 title
- Optional overlay
- Smooth scroll-to link
Built as a dynamic block with PHP render.php and bundled assets (@wordpress/scripts).
📦 Installation
-
Clone or download this repository into your WordPress plugins folder:
cd wp-content/plugins git clone https://github.com/code-mat/wp-hero-block.git -
Install dependencies and build assets:
cd wp-hero-block npm install npm run build -
Activate the plugin in WordPress Admin → Plugins.
⚡ Development
Start a development build with file watching:
npm run start
Build for production:
npm run build
Create a plugin zip for distribution:
npm run plugin-zip
🛠️ Block Features
- Background
- Image (uses
<img>withobject-fit: coverfor better LCP) - Vimeo embed via `
- Image (uses