Modifying other core editor panels besides Featured Image in the block editor
Modifying other core editor panels besides Featured Image in the block editor
Modifying other core editor panels besides Featured Image in the block editor
After studying documenation and this documentation and this stackoverflow question I came up with a solution. We could use wp.data.select(‘core/editor’).getCurrentPost().categories instead of wp.data.select(‘core/editor’).getEditedPostAttribute(‘categories’). Both should work. /** * Show tags panel only for certain category using ID */ const { select, dispatch, subscribe } = wp.data; window.onload = (() => { const categoryId = 9; … Read more
How to show available Typography settings by default in Gutenberg Block Editor?
TT3 make img in 2nd column same height as content of 1st column
As per the docs, the file passed to render in block.json receives 3 variables: $attributes (array): The block attributes. $content (string): The block default content. $block (WP_Block): The block instance. So you need to output your attributes from $attributes into the HTML, so that your JavaScript can read the values. In this example I put … Read more
load-styles.php generates css rules. How are the generated styles determined and how can I alter them?
Filtering context for render_block function
Get realtime title and featured image value in WordPress block
Registering plugin’s Gutenberg blocks in custom theme
After some digging I found that I had a left over save function on my block that was throwing an error. I removed that and ensured that wp-server-side-render was in the script deps.