This custom control enhances the great Lazy Blocks Plugin and can be used in blocks to offer
the WordPress Author to choose either wordpress posts, pages or categories.
- The custom control dynamically renders a select with options based on the chosen
- Available entity types are
- Post Type
- Taxonomy Type
- Post (Default or Custom post types)
- Taxonomy (Tags, Categories, Custom Taxonomy)
- The select options can be restricted to use a certain entry as parent
Select Multiple Restrictions
- The option “Select Multiple” is only available for the entity type
Max Item Restriction
The custom control is using the
- This method can load a maximum of 100 entities and render them as dropdown options
- When choosing the entity type
Page, depending on the number of pages you have, the first time, the call might take
a while, as the whole page object get’s loaded
- To use a custom taxonomy type, make sure to activate the REST option in the
register_taxonomyfunction by adding
'show_in_rest' => true,
- Parent Entity Restriction does only work for Pages / Categories / Custom Taxonomies, as other Entity Types (e.g. Posts / Tags) cannot be nested
- For the
post-type, an ignore list excludes all wordpress related post types:
You can use the custom control exactly how you use normal controls for lazy blocks
- Make sure you use WordPress 5.0.x. As alternative you need to install the
Gutenberg plugin to use Lazy Blocks.
- Make sure, you have installed the Lazy Blocks Plugin
Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to
leave your web browser. To do an automatic install of lzb-select-dynamic, log in to your WordPress dashboard,
navigate to the Plugins menu and click Add New.
In the search field type lzb-select-dynamic and click Search Plugins. Once you’ve found our plugin you can view details
about it such as the point release, rating and description. Most importantly of course, you can install it by simply
clicking “Install Now”.
The manual installation method involves downloading our lzb-select-dynamic plugin and uploading it to your webserver
via your favourite FTP application. The WordPress codex contains
instructions on how to do this here.
Contributors & Developers
“Lazy Blocks: Select Dynamic Control” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Add option to select multiple items for Entity Types
- changed compatibility to WP version to 6.1.0
- Fix problem with missing custom post types for entity type
- Add more post types to ignore list, add docs about ignore list
- changed compatibility to WP version to 5.9.0
- changed compatibility to WP version to 5.8.2
- changed minimal WP version to 5.8
- changed minimal PHP version to 7.2
- Enhancement to have Taxonomy Type as an option
- BREAKING: rename options, enhance with “Post Type” option to select a certain Post type in your block. Manual Migration needed!
- Enhancement to offer custom post types and tags / categories as entity
- Initial Release