Skip to content

ndiego/block-visibility-add-on-example

Repository files navigation

Block Visibility – Add-on Example

Block Visibility allows you to dynamically control which blocks are visible on your WordPress website and who can see them, which includes the ability to schedule blocks.

This example add-on plugin for Block Visibility illustrates how to extend core functionality with additional visibility controls. The plugin adds an "Example Control" that allows you to toggle the visibility of any block. Use this example as the foundation for your own more sophisticated visibility controls.

For a detailed walkthrough on how to extend Block Visibility and how this plugin was built, refer to the following resources.

Installation

  1. Make sure you are running the latest version of Block Visibility, WordPress, and you are using the Block Editor
  2. Download and activate the Block Visibility – Add-on Example plugin from GitHub.

Development

  1. Set up a local WordPress environment.
  2. In the wp-content/plugins folder, clone the GitHub repository: https://github.com/ndiego/block-visibility-add-on-example.git
  3. Navigate to the wp-content/plugins/block-visibility-add-on-example folder in the command line.
  4. Run the npm install command to install the plugin's dependencies within a /node_modules/ folder.
  5. Run the npm run start command to compile and watch source files for changes while developing.

Connect