You forgot to declare the attributes:
registerPlugin( 'page-layout-plugin', {
icon: 'smiley',
attributes: {
'showSidebarAttribute': {'type': 'boolean', 'default': true}, // <-- and maybe others
},
render: ( props ) => {
You can drop the quotes of the properties, of course (they are optional), I keep them because the equivalent statement is copied over from the PHP part where the quotes are necessary:
'showSidebarAttribute' => ['type' => 'boolean', 'default' => true],
Related Posts:
- Proper, exhaustive documentation for wp.editor etc
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- How to sanitize select box values in post meta?
- Strategy to get post meta for use outside the loop
- Add colors to existing color palette without replacing it
- Can you filter posts by meta key with the getEntitityRecords selector?
- Set Expiration Date of a Post from the Frontend with wp_insert_post
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- create blocks programmtically on theme activation
- Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
- How to support Lazy Loading Assets in a WordPress Theme?
- WordPress Gutenberg Theme: Structure, Hierarchy and Custom Templates
- Gutenberg Reusable Block as part of WordPress Theme page
- Is there a need for nonce with Post Metabox?
- Custom button block doesn’t work
- How to float an image in Gutenberg
- Gutenberg – editor-font-sizes in functions not working
- Metadata Query when storing data as array possible?
- Can’t select my block by clicking on it
- Which file handles the block latest posts, I want to examine excerpt handling
- create-guten-block in wordpress theme?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Not able to select width of blocks inside of cover block
- How to check if a WordPress core block is active in sidebar
- gutenberg add classes to list items
- How do you replace content generated by custom fields with custom blocks in Block Editor?
- Custom Blocks as part of a theme
- Wp Super Cache stops the update of a Post Meta
- How to wrap all titles generated by Gutenberg “Heading” block with tag
- How to show specific post meta?
- How to add InnerBlock multiple times in the same block
- Moving post title down the page / Removing a block from a post
- Running a function on post update with new post meta
- HTML block gutenberg templates
- Gutenberg theme development: how to add “headers” option under styles > colors > elements?
- Is it possible to set a variable for get_post_meta?
- Get attachment meta (I need attachment ID, unsure how to find it)
- How can I sort my loop based on meta data, using a form?
- Change default rel attributes for Image Block & Button Block
- Related Post Category Filter
- How to update mark-up of a gallery block in a custom theme?
- Auto focus RichText field
- How to create nested array attribute
- Show popover with url and option to open in new window
- How to Modify WP_Includes/blocks/latest_posts.php
- How to render block editor in wp-admin custom pages programmatically
- Social-Link block not loading html on page with custom theme
- How to diagnose wp-env environment problem
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- WP Gutenberg custom block – generate theme colors from SASS and use them in the inspector and php callback
- Posts Page shows Classic Editor interface not Gutenberg
- How can I include custom Gutenberg Blocks in a theme?
- Block validation failed for `core/pullquote` after adding theme support for editor-color-palette
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- Make a custom field in admin post.php read only
- Change default options on attachment page
- Correct way to make a custom block theme responsive
- Multiple content areas with Gutenberg – Transparent areas mid content
- Insert gutenberg blocks into template
- After a while attachment meta data is missing “sizes” data
- Template for posts of category in block theme?
- Can’t select my block by clicking on it on apiVersion – but using blockProps
- How can I use pre declared blocks in a php file?
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- Full site editing templates folder vs block-templates
- How to set the margin on an innerBlock in a block variation?
- Align images to the left of the content
- Image and font support missing in editor when deploying theme remotely
- When trying to run build script with gutenberg (with SVG import) – Error: Plugin name should be specified
- Block to show posts from same category
- Unwanted spacing for cover block
- Activate Gutenberg group block for theme
- How can a theme define which settings for blocks are available in the block editor?
- How to add multiple custom blocks in custom WordPress theme using create-block?
- How to create a template for a post in Query Loop block?
- Force post update with React
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions
- Force-update the meta variable first set using `var [ meta, setMeta = useEntityProp( ‘postType’, postType, ‘meta’ );`
- How to add group-row to InnerBlock template?
- Adding block style dependencies
- useBlockProps() nests wrapper with class name inside block wrapper in the editor
- Registering a block in “My Patterns”
- get_theme_mode & set_theme_mode in block editor
- Block editor layout not present in post editor
- Modify HTMl on header.php on Block Theme like Twenty Twenty Three?
- Disable interactivity for core navigation
- Full Site Editing, Block Theme, Gutenberg, Site Editor
- FSE Change Post Template to Something Other Than a List
- how to combine wordpress and front framework
- Correct way of implementing complex navigation in Gutenberg
- How do I access the current post object within a block theme template or pattern?
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- Get the blog page URL set in Options
- How to create .pot files with POedit?