Questions tagged [block-editor]

The Block Editor is the 'new publishing experience' slated for introduction in WordPress 5.0, replacing TinyMCE and other aspects of the default editing experience. Find out more at https://wordpress.org/gutenberg/

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

"Your site doesn’t include support for the “cwp/block-gutenberg-forms” block." error [closed]

The Wordpress plugin "Gutenberg Form" and the forms I have created with it on my website have been working very well until today when they suddenly do not work anymore, and when I go to edit ...
user avatar
  • 1
1 vote
0 answers
19 views

Can you edit WP gutenberg block css without a plugin?

I want to add custom css to my gutenberg table block. I want to adjust the css width of the tds. Ive tried selected the "Fixed Width table cells" toggle but the table seems to have different ...
user avatar
  • 11
1 vote
0 answers
52 views

How to stop Gutenberg from outputting inline CSS for specific blocks?

I like to know how I can remove these individually. <style id='wp-block-separator-inline-css'> @charset "UTF-8";.wp-block-separator{border-bottom:1px soli ... </style> WP has a ...
user avatar
0 votes
1 answer
16 views

Using full site editing, can I edit just one specific post / page to be unique?

Let's say I have a special news report post and I want it to have a unique title (so that on the archive page it has the original post title, but on the post page it has a different title that I can ...
user avatar
0 votes
1 answer
23 views

call ACF gutenberg block like a shortcode?

I have created a gutenberg block with acf with different field options. See a simple example: <?php /** Block Name: spacer **/ // Field Options $size = get_field('size'); $classes = ['fs-spacer-'...
user avatar
  • 339
-1 votes
0 answers
13 views

My theme doesn't have page Attributes option on post edit page (block editor)

Weird... I'm trying to use my custom template. I moved template php file to theme template folder. However I have found out that my theme's edit page dosen't show template select option on edit page. *...
user avatar
1 vote
1 answer
30 views

isSavingPost() for widgets

I want to get the block ID of my widgets (e.g. #block-1, which is displayed on the frontend after saving a widget) on the widgets screen in the backend. What I try to achieve is to display the ID of ...
user avatar
  • 167
2 votes
1 answer
44 views

Using pre_get_posts on a specific core/query block

I’m trying to apply the pre_get_posts to a specific core/query block, in order to programatically modify the number of posts displayed when a custom attribute is set. If I use the render_block hook, ...
user avatar
0 votes
1 answer
18 views

Place image caption outside of figure tag (Gutenburg Image Markup)

I format my single.php images to a perceived 3:2 ratio like this: <figure style="position:relative; width:100%; padding-bottom:66%;"> <img style="position:absolute; width:100%; ...
user avatar
1 vote
0 answers
22 views

Restrict heading level in Gutenberg block `core/heading`

I'm building a simple Gutenberg Block that lets the user create just headlines and lists. I've got a solution, but the user can select any heading level she or he wants to. How I can I restrict the ...
user avatar
  • 203
0 votes
0 answers
6 views

Get ACF taxonomy term and sub-term lists ACF blocks

I want to get list of parents and child terms from ACF field type Taxonomy. This things need to display as ACF blocks. i have tried many things to done this stuffs but but it's not working for me. ...
user avatar
0 votes
0 answers
10 views

Console errors in 6.0-RC1 Widget screen

Sine 6.0-RC1 the following console error appears on the block widgets screen, on Firefox: Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a ...
user avatar
0 votes
0 answers
15 views

How do I stop a dynamic Gutenberg component from re-rendering on every keystroke?

I'm using some dynamic components inside a custom block; predominantly used for input fields inside the <InspectorControls> component. Below are the relevant portions of the custom block. import ...
user avatar
  • 206
0 votes
0 answers
24 views

Gutenberg InnerBlocks with ACF Blocks - How to enable multiple buttons?

I'm trying to use Gutenberg's InnerBlocks with ACF Blocks in my allowedBlocks I have [ 'core/heading', 'core/paragraph', 'core/buttons'] In my 'core/buttons' block I'd like to allow multiple buttons, ...
user avatar
0 votes
0 answers
30 views

Gutenburg: Remove border of selected block

I am writing a plugin that creates a custom block. When the block is selected/focused in the editor, a border is created abound it (blue in the current version of WP). I would like to disable the ...
user avatar
0 votes
1 answer
16 views

Gutenberg Editor: dynamically edit slug field based on ACF field

I'm trying to edit the slug field on the right panel of Gutenberg editor and edit its content based on a custom field. I noticed that I can access to the field by using wp.data.select('core/editor')....
user avatar
2 votes
0 answers
23 views

How do I replace a render_callback function for a block?

I like to basically use a modified version of the below function. There is pre_render_block and other filters. I have not found out how to get attributes and context the exact way that function does. ...
user avatar
0 votes
0 answers
16 views

Additional file upload in Gutenberg page options/featured image

I would like to add an additional image upload in the featured image part of the Gutenberg page options editor. e.g. as in the image below, but with an additional file upload area. In my PHP file I ...
user avatar
0 votes
0 answers
22 views

How to work with multilingual sites using the full site editor and block themes?

I'm developing a block theme and I need the user to edit the site content with the full site editor in two different languages. In this situation, what would be the approach to allow the same page to ...
user avatar
0 votes
1 answer
42 views

Gutenberg Editor: dynamicaly change slug field with an ACF field

I have a custom field with ACF named "short_title" and I want the post's slug based on this field instead of the post title field. I already wrote this code: function testSlug($post_id) { ...
user avatar
1 vote
0 answers
38 views

How to disable inline css styles generated by Gutenberg editor?

I've got Genesis-blocks plugin installed (it got updated from Atomic blocks). I am using blocks and resuable blocks to create pages. The problem I am facing is, most of these blocks inject their own ...
user avatar
  • 121
0 votes
0 answers
15 views

Trying to edit a page returns the editor encountered an unexpected error

I have a website hosted on server that doesn’t have any server cache , neither any wp cache plugins are installed and when I try to edit a page it returns a blank page with message “the editor ...
user avatar
  • 103
1 vote
1 answer
10 views

Parent field missing from custom post type in the block editor

I have a hierarchical custom post type, but the Parent field is missing in the block editor sidebar. register_post_type( 'guides', [ 'public' => true, 'hierarchical' => true,...
user avatar
  • 9,917
0 votes
0 answers
18 views

The Global Styles missing

I am working on my first block-based theme, and trying to leverage theme.json as much as possible. I would like to allow client to change the the fonts, colors and other variations defined in the ...
user avatar
  • 143
0 votes
0 answers
9 views

Custom Block Not Shown in Block Inserter

I am attempting to create a new custom block plugin in Wordpress v5.9.3. I'm following this Wordpress guide on creating a simple block. My block does not appear when I search for it in the Block ...
user avatar
1 vote
0 answers
22 views

do_blocks does not include its CSS

I have a template where I must use the do_blocks function. It works fine in the HTML sense, but it seems to just not load the CSS related to the block. Is there a way to force it to load the CSS of ...
user avatar
  • 788
0 votes
0 answers
14 views

How to override supports of innerBlocks?

Is it possible to specify the supports of each specific InnerBlock when using nested components?, In the following example I want to disable the color background feature added in the theme.json to the ...
user avatar
0 votes
0 answers
51 views

Cannot read properties of undefined (reading 'show_ui') Error on WordPress Post Editor

We're getting the following error on our Block Editor when trying to edit a post: TypeError: Cannot read properties of undefined (reading 'show_ui') at https://informationsecurityleadership.com/wp-...
user avatar
0 votes
1 answer
17 views

Add Block Before Entry Title Using PHP

I'm using this code to add a block before the entry title on the front page but its not working: $e = get_block( '552' ); $eblock = apply_filters( 'the_content', $e->post_content ); echo $...
user avatar
0 votes
0 answers
26 views

Detect selected block pattern from a specific Pattern category

It is possible to detect when the Inserter panel is opened. It can be done using the following code snippet: wp.data.select( 'core/edit-post' ).isInserterOpened() However, I am wondering if there is ...
user avatar
0 votes
0 answers
55 views

How to only show ACF field if another block is being used?

I'm developing a tab system on my site and I want to build the contents of the tabs using ACF blocks. I have a "Tabs" block which handles the titles of the tabs. I have linked the index ...
user avatar
0 votes
1 answer
12 views

I cant find the custom html block

I cant find the custom html block in wordpress. Does it not automatically come with a custom html block or do I have to create my own? I look for it in the search but it doesnt come up. I will click ...
user avatar
  • 11
1 vote
0 answers
23 views

Block Editor: Reset Reusable Blocks to last saved record

I’m trying to build my own Block Editor and I would like to reset all blocks to their last saved state by dismissing all unsaved changes when switching from Edit Mode to Preview Mode without reloading ...
user avatar
  • 11
1 vote
0 answers
17 views

Can I add a default Block to my custom theme?

Lots of plugins provide both shortcodes and PHP for adding elements... either directly in a page or post, or programmatically in a theme template. Is there a process for adding a Block, like Latest ...
user avatar
0 votes
0 answers
48 views

Override WordPress core post-template.php block template

I need to modify the default markup generated using the render_block_core_post_template function located inside wp-includes > blocks > post-template.php. I don't see any other way of modifying ...
user avatar
0 votes
0 answers
12 views

Intermittent Gutenberg 504 Gateway Timeout when calling REST route to retrieve categories

Our Wordpress site uses the Gutenberg editor for editing posts, and occasionally many of our users experience 504 Gateway Timeout errors when the editor is loading in their browser. Specially, it is ...
user avatar
  • 101
0 votes
0 answers
30 views

ACF Gut block broke wordpress default style?

When I add a new custom ACF gut block, he broke the default WP style: After adding a custom block: Example of ACF block: acf_register_block_type(array( 'name' => 'rte-...
user avatar
  • 165
0 votes
1 answer
41 views

Update number of posts when attribute changed

I have a simple block that shows the most recent posts. But I want the number of posts to be changeable. To do that, I created a simple attribute and integrate it with a range control. const ...
user avatar
3 votes
1 answer
162 views

How to add code to `head` with WordPress 5.9 FSE (Full Site Editing)

Like adding Google Analytics code, and some other things surrounding the <head> tag, how's all this done in FSE as there's no header.php? Should I use functions.php for everything? (Also can ...
user avatar
1 vote
0 answers
18 views

Removing advanced section from brand new gutenberg block

I have created a new Gutenberg block using block.json with minimalistic options. However, the Advanced Section automatically appeared. How do I remove this?
user avatar
  • 71
1 vote
0 answers
22 views

Is there an additional block.json property to set to get an InnerBlocks child to respect the "supports" property?

My InnerBlock child block doesn't seem to respect the block.json "supports" property and I can't understand why not. For reference, this custom block is comprised of: a parent ucomm-blocks/...
user avatar
  • 220
0 votes
1 answer
29 views

Is there a wordpress filter to edit the markup of inline images?

I would like to add a class to wordpress inline images. Is there a filter that i can use to edit its markup?
user avatar
  • 275
0 votes
1 answer
33 views

Custom default settings for WP native Gallery Block

I've started with MarkJ's answer - JavaScript included into the block editor. I wanted to control more attributes for gallery than linkTo — the number of columns, cropping, and image size. wp.domReady(...
user avatar
2 votes
0 answers
52 views

How to set defaults for Border controls in custom block

WordPress provides Border control for a block, if the block has support for it. By default, these Border controls are not set: I have enabled a support for these controls in my block by adding the ...
user avatar
0 votes
0 answers
25 views

conditional statement if wordpress theme block is empty then hide block

I need a conditional statement for the following for the WordPress block theme I am working on. if <!-- wp:group {"tagName":"main"} --> is empty then display none.
user avatar
0 votes
0 answers
6 views

How to remove the ManageBlocksMenuItem in the ToolsMoreMenuGroup in the Gutenberg Editor?

In the Edit Article page of the Gutenberg Editor, click the three buttons on the far right side of the Gutenberg menu bar. You get an overlay with VIEW, EDITOR, PLUGINS, and TOOLS sections. Block ...
user avatar
  • 1
0 votes
1 answer
36 views

Block patterns: Any way to reset the pattern to whatever is in the code?

We've been working with block patterns. So we built the blocks, for instance, with Divs as the structure. But the client comes back 'for accessibility, we need the structure to be UL/LI. So we modify ...
user avatar
  • 788
0 votes
1 answer
8 views

Adding content to Page settings rather than Block settings

I have a Gutenberg editor. Some content of the page is global, and not relevant to an individual block. I'd like to add content to the page settings: I can see how you can add a plugin that creates a ...
user avatar
  • 234
1 vote
0 answers
47 views

Track Block Pattern Insertion Within the Block Editor

Our team is looking for a way to track when block patterns are inserted into the WordPress block editor. We would also like to record the name of the block pattern that's being inserted. This tracking ...
user avatar
  • 416
1 vote
0 answers
15 views

Not able to select width of blocks inside of cover block

I am using a blank theme with the theme.json for gutenberg blocks. When I create a cover block and select any block inside of my cover block it doesn't give me the option the select the width ...
user avatar

1
2 3 4 5
29