Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wprig/block-areas
Introduces a simple method for defining block areas to use the block editor outside of the post content.
https://github.com/wprig/block-areas
Last synced: 4 days ago
JSON representation
Introduces a simple method for defining block areas to use the block editor outside of the post content.
- Host: GitHub
- URL: https://github.com/wprig/block-areas
- Owner: wprig
- License: gpl-2.0
- Created: 2019-06-26T16:43:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T14:51:34.000Z (over 4 years ago)
- Last Synced: 2024-08-03T13:04:24.030Z (3 months ago)
- Language: PHP
- Homepage: https://wordpress.org/plugins/block-areas/
- Size: 39.1 KB
- Stars: 38
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![WordPress plugin](https://img.shields.io/wordpress/plugin/v/block-areas.svg?maxAge=2592000)](https://wordpress.org/plugins/block-areas/)
[![WordPress](https://img.shields.io/wordpress/v/block-areas.svg?maxAge=2592000)](https://wordpress.org/plugins/block-areas/)# Block Areas
Introduces a simple method for defining block areas to use the block editor outside of the post content.
This is an experimental plugin that explores basic usage of Gutenberg blocks outside of the content bubble, on a sitewide level.
See the [WP Rig Blockade](https://github.com/wprig/wprig-blockade) project for experimental usage of it.
## Requirements
* WordPress >= 5.0
* PHP >= 7.0## Usage
After activating the plugin, you can create and edit block areas under *Appearance > Block Areas*. There should be two block areas already, `header` and `footer`.
Block areas are identified by their unique slug. Since `header` and `footer` are expected to exist, make sure not to delete them.
In order to print a specific block area, for example in your theme, use `block_areas()->render( $slug )` (e.g. `block_areas()->render( 'header' )`).
## Contributing
Any kind of contributions to Block Areas are welcome. Please [read the contributing guidelines](https://github.com/wprig/block-areas/blob/master/CONTRIBUTING.md) to get started.