Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/elpuas/elpuas-custom-block-styles/archive/refs/heads/main.zipCustom Block Styles Plugin
This plugin is based on the article “You Might Not Need a Custom Block: The Block Styles API” and is designed to extend the functionality of the WordPress block editor by adding custom block styles.
Description
The Custom Block Styles Plugin allows you to easily add new styles to existing blocks in the WordPress block editor. Specifically, this plugin includes:
- Custom Button Styles: Adds styles like a Primary Button with an icon and hover effect, as well as a Secondary Button.
- Custom Heading Styles: Introduces Gradient and Glowing header styles to make your headings stand out.
These styles are registered using server-side functions in PHP, making them easily accessible and ready to use within the block editor.
Installation
- Download the plugin files from this repository.
- Upload the plugin to your WordPress site via the plugin uploader, or manually place the files in the /wp-content/plugins/ directory.
- Activate the plugin through the “Plugins” menu in WordPress.
Usage
After activating the plugin, you’ll see the new styles available when editing buttons and headings in the block editor. Simply select the style you want from the block’s settings panel.
Article Reference
For a detailed guide on how this plugin was built, you can read the full article here: “You Might Not Need a Custom Block: The Block Styles API.”
License
This project is licensed under the MIT License - see the LICENSE file for details.