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
0answers
2 views

change Default Gutenberg Blocks

hi in wordpress Gutenberg editor Default Gutenberg Blocks is paragraph how to change this to gallery or other block?
0
votes
1answer
7 views

Line break in Gutenberg post title?

Is it possible to have line break in Gutenberg post title? Ideally I'd like not to use custom fields to keep in consistent with the plugins, etc.
0
votes
0answers
13 views

how to copy shortcode into a block?

I intended to copy the following content [quiz] [question]how to create a remote branch?[/question] [answer][/answer] [/quiz] But it was automatically put into a shortcode block which I don't want. I ...
0
votes
0answers
5 views

Gutenberg Block fail to save block metadata

I try to copy the headline in order to create a custom one. Unfortunately the block does not save the meta data. Why is the content correctly saved but not backgroundColor? index.js /** * External ...
0
votes
0answers
15 views

How to overwrite Gutenberg column block editor html structure

Gutenberg is outputting this kind of html with classes like wp-block-columns several times and wp-block-column ....s.php:207:string ' <div class="wp-block-columns"> <div class=&...
0
votes
0answers
9 views

Order InnerBlocks in custom Gutenberg block by date attribute

I have the following custom Timeline block: const { blocks: { registerBlockType }, blockEditor: { InnerBlocks }, element: { createElement: el }, } = (window as any).wp; export default ...
1
vote
0answers
12 views

Creating a custom Gutenberg block with columns

I would like to create a custom block that contains columns, and starts with various other blocks in each of the columns, however the code I have come up with so far will create a column block in the ...
0
votes
0answers
10 views

How to modify wordpress gutenberg output for columns & column?

I'm using bulma.css in my WP project. I want to change html output for columns & column block. I rewrite css rules for columns and it's working good. The problem is with column element and witch ...
0
votes
1answer
15 views

how to make has_block() see inside blocks too

I am using has_block() to check if post has a specific block type but it does not see blocks inside another blocks, like columns block. So, how to make it find a gallery inside the column?
0
votes
1answer
43 views

Gutenberg : how can I get the title of the current block within its 'edit' function?

I'm a Gutenberg newbie. I'm trying to display a placeholder component with my block's edit function: export default function Edit( { attributes, setAttributes, className } ) { return ( <...
0
votes
0answers
7 views

Excerpt and blocks group

When using block group, the excerpt is empty, assuming that there is only content in block group. Is any way to fix this? Is there any way to return first paragraph of the content? Thanks
1
vote
0answers
11 views

Gutenberg : in the backend, I just want to store a JSON object

I'm starting to learn Gutenberg blocks. I want to create a Gutenberg "track" block as part of a larger music "app" i'm working on. The whole app will rely on a standard named JSPF,...
2
votes
1answer
26 views

Difference between register_block_type & wp.blocks.registerBlockType

I am creating a plugin that is supposed to add custom blocks to Gutenberg. I have registered and built all my blocks using WordPress's JavaScript function wp.blocks.registerBlockType(). It works just ...
1
vote
0answers
28 views

How Add New Button to Gutenberg Editing Toolbar

When i publishing a content using Gutenberg I miss a button to create a new post right there without leaving the editor and going back to this. See the image to better illustrate the issue. How can I ...
0
votes
0answers
9 views

How to avoid duplicate dependencies in gutenberg blocks

The wordpress gutenberg block build script uses @wordpress/dependency-extraction-webpack-plugin to build the blocks without wordpress dependencies being repeated but what about other dependencies? If ...
0
votes
1answer
15 views

Auto inserted strange characters in wp post

I am facing a strange error on my site. Whenever I publish or update the post, some of my content just replaced by other random characters. Here is an example post : Original Content: त्यसमा पनि प्रति...
0
votes
0answers
16 views

Dynamically write gutenberg classes to css file

So i am creating a custom gutenberg and currently i have build it using the color theme from the brand so is used thr getColorClassName to generate the css class for when a color is added to the ...
0
votes
1answer
43 views

Where in a Wordpress installation is the code for the default Gutenberg blocks located? [duplicate]

I apologize if this has been answered already. I've spent several hours searching through the WordPress directories and documentation, and I haven't been able to find the code for the default ...
0
votes
0answers
11 views

Prevent block from being used in main editor, use only as inner block

I am currently using the allowed_block_type filter to control the available blocks in my theme, similar to the following example: function acf_allowed_blocks($allowed_blocks, $post) { // Register ...
0
votes
0answers
15 views

Gutenberg editor - Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

I would like to alter the "Publish" button in the Gutenberg editor. When i check a checkbox in the Gutenberg sidebar, the "Publish" button should become "Publish and notify&...
0
votes
0answers
6 views

have gutenburg groups/sections fade in as they are loading

I'm trying to re-create a site that was built in squarespace. On that site they have the ability that fades each section in as the user scrolls. I'm not sure what it's called so I don't even know ...
0
votes
1answer
13 views

Filter root element of tag cloud block

By default the tag-cloud block in the (Gutenberg) block-editor renders a root element as follows: <p class="wp-block-tag-cloud">...</p> This is the corresponding code what is ...
0
votes
0answers
13 views

same size for all images in Gutenberg block-editor gallery

I need to create a gallery with logos of partners of our website. All logos should always visualize at the same dimensions, so that no logo results bigger than the others. All uploaded images are ...
0
votes
0answers
19 views

How to create a custom block in Gutemberg with multiple checkboxes?

I am trying to create a plugin that will add a custom block in Gutenberg that will display a div with a combination 3 links on the frontend, based on the options that that I choose in the editor. In ...
0
votes
0answers
18 views

What hook to use for modifying the markup of blocks?

Wordpress had this Block "Gutenberg" Editor since version 5.0. Are there existing actions or filters you can use to modify the rendered HTML markup right from the server-side? If so, what ...
0
votes
0answers
17 views

Hook for when gutenberg editor is initialized?

I'm currently writing a plugin that adds a couple of gutenberg blocks. Some of the blocks require the need for a script block to exist that contains api information from facebook right when the body ...
0
votes
1answer
13 views

How to get custom page template being edited in gutenberg editor

I want to know custom page template name (the one chosen in page attributes - template) in PHP, before page opens in order to enqueue additional scripts according to chosen template. I know how to get ...
0
votes
2answers
17 views

Can “Classic Editor” plugin help to replicate the old website / theme development experience from c. 2011?

Returning to WP after nine years – will the classic editor plugin allow me to pretend it's 2011 as I migrate my site over from squarespace? I'd like to move my business website to self-hosted ...
0
votes
1answer
12 views

How to use __experimentalCaptureChildToolbar

currently i am developing a block and i am trying to use an experimental API __experimentalCaptureChildToolbar (see https://github.com/WordPress/gutenberg/pull/18440). This should be included in 7.2.0 ...
0
votes
0answers
20 views

Customize Gutenberg blocks output on the front-end

I am looking to modify the front-end HTML output of Gutenberg blocks, through PHP. (The following is a simplified example of what I need, for the purpose of this question.) I have a WP page with ...
2
votes
0answers
28 views

Extending Gutenberg group block: How to properly combine multiple attributes?

I'm extending the group block. The problem I experience is that if I select an option nothing changes on the backend. But if I change it a second time it shows the class of the previous selected ...
1
vote
1answer
33 views

Is there a better way to implement responsive images than what WordPress uses by default?

I am new to WordPress, and I started with my own custom theme. For responsive images in WordPress, I currently use custom html blocks in my theme with picture or img elements that use multiple ...
0
votes
0answers
10 views

Custom WP Block returning null on front end

I hope someone is able to help me. I'm playing with the WP Blocks and beginning by creating my own button block as a testing example. I have my block appearing in the selection tray. When I add my ...
0
votes
0answers
13 views

RSS feed WP widget vs Gutenberg Block?

I am trying to create a page that contains multiple RSS feeds. In the past, when using the Wordpress RSS widget, there was an option to include a title, such as the source website, etc. That option ...
0
votes
0answers
21 views

Add custom classes for blocks in editor based on custom attributes

I have been able to add additional classes to the core/heading block using blocks.getSaveContent.extraProps filter, however, this only adds the class on the frontend, I would also like that custom ...
0
votes
0answers
16 views

Basic Block Usage Help on Wordpress

Im very new to wordpress and am trying to get a simple design going for a single page on my site. On the editor page, I get what I want. The design should look similar to this:
0
votes
0answers
22 views

Reading plugin settings in esnext wordpress block

I am currently trying to create a Wordpress-Plugin that in itself creates a few gutenberg blocks. I want to have some global settings set with https://developer.wordpress.org/reference/functions/...
0
votes
1answer
23 views

How change a core block label

I would like to be able to change the core/heading block label that is shown here, what is the best way to do so?
0
votes
1answer
52 views

React error #231with Custom Blocks after upgrade to WP 5.5

So I wrote a plugin for a custom block using create-guten-block by ahmadawais. Everything was working fine until the WP update to 5.5. Now I when I try to edit a page that has one of my custom blocks ...
0
votes
1answer
68 views

How to save post meta as an array in Gutenberg?

I am new to react and Gutenberg development and I am trying to add some fields in the Document sidebar. While I have success saving the meta as single values I am struggling to find a way to save the ...
0
votes
0answers
66 views

How to use the Wordpress < LinkControl /> Component

The issue I am looking for a way to add linking functionality to a custom block of mine and found different approaches to this need. There are: The URLInputButton Component The URLInput Component The ...
1
vote
0answers
30 views

How to Programmatically add an empty Block to every post on wordpress site?

I am looking for a way to add add an empty paragraph Block to every existing post on wordpress site Programmatically or through backend MySQL query. I want to keep this block updating in future ...
1
vote
1answer
164 views

Where on Github, or elsewhere, can I find the code for core-blocks?

Apparently, at one time, there was a directory of core-blocks for building Gutenberg templates on GitHub, but I'm not finding it anywhere. I talking about core/paragraph, etc. array( 'core/...
0
votes
2answers
72 views

How to troubleshoot a custom Gutenberg block error: “This block has encountered an error and cannot be previewed”

I'm using a plugin from LinkedIn Learning to customize into my own plugin's custom Gutenberg blocks. After I've edited the file plugin/src/index.js (I edited the edit() & save() functions), I now ...
0
votes
0answers
16 views

How to fix a Gutenburg block error - A component is changing an uncontrolled input of type url to be controlled

I am getting this error when I add a value to the buttonUrl input. A component is changing an uncontrolled input of type url to be controlled. Input elements should not switch from uncontrolled to ...
0
votes
0answers
14 views

Gutenberg link of internal page not showing

I'm trying to add a link to my gutenberg paragraph. But when I try to add an internal link, the suggestion isn't showing the desired page (or the desired article), but it's working well for my custom ...
0
votes
1answer
10 views

How Do I Prevent An Image From Automatically Adjusting In Guttenberg Block Gallery?

I am trying to implement a Gutenberg gallery with 10 images with a 4 column gallery. The first two rows coming fine with 4 column images each row. But the issue is that the last row, which has 2 ...
3
votes
1answer
31 views

serialize_blocks breaking html tags in content

I'm trying to inject some data into blocks via PHP but am running into trouble with parse_blocks/serialize_blocks breaking my content I'm using the default 2020 theme and have no plugins installed ...
0
votes
1answer
25 views

How to custom page template for the Gutenberg editor

I have read several questions/answers/articles about "custom templates," including the Block Editor Handbook, but nothing gets at what I'm looking for. Granted, this does smack of questions ...
1
vote
2answers
19 views

Creating query to show which editor (classic or block) was last used to edit a post/page

I have a WordPress site that has some pages created/edited in Classic Editor, and some pages that built/edited with Gutenberg/Block Editor. I am trying to create a report of which pages use each ...

1
2 3 4 5
18