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
1answer
17 views

Gutenberg - Custom blocks onClick not working?

I'm trying to develop a custom block for the Gutenberg editor. I'm trying to display a button and call a web service then redirect the user to the returned URL. Can anyone please help me why my click ...
0
votes
0answers
10 views

Building a wordpress site with bulmapress/gutenberg/otter blocks: How can I style the comments?

I’m in the middle of my first attempt at building a site using Gutenberg, and the Otter Blocks plugin. You can check it out here: https://staging.radionowheremusic.com Every aspect of the page is ...
0
votes
0answers
12 views

How do we send non-textual messages to gutenberg blocks?

Background/context: A guttenberg gallery (which is a block), where individual slides (which are also blocks) can represent multiple different media types. The [human] editor can insert a slide and ...
0
votes
0answers
7 views

Change default values of Gallery Block settings

How to change the Default Settings of Gutenberg Gallery Block When creating a new Gallery Block, I want the default values to be Columns: 2 and Crop Images: false
1
vote
0answers
23 views

Multiple amp-image overlays. How to properly do this in wordpress?

Summary Goal I want to: Add multiple overlays to an image, on a page, created with gutenberg, rendered as amp-img on the frontend. I want this kind of end result, but added through gutenberg. When ...
0
votes
0answers
9 views

Bulk edit Gutenberg single images to change from linking to media file to attachment page

I have several hundred posts which include a mix of single image and gallery blocks. All of them currently link to media file. What's the fastest way to change this to attachment page instead? (And ...
1
vote
0answers
11 views

Custom dynamic Gutenberg block not rendering

I am creating a dynamic Block to display a widget area inside post. I coded the following in ES5. The block was registered successfully, but it has failed to render the I want. I have looked up a ...
0
votes
1answer
31 views

What version of Gutenberg is included with WordPress?

Gutenberg is developed separately https://github.com/WordPress/gutenberg and the latest version currently is 7.2.0. How to find out which version of Gutenberg is included in my WordPress installation?...
1
vote
2answers
34 views

Gutenberg Additional CSS Class without modifying theme?

The "Advanced" option to add Additional CSS Classes to a Gutenberg block looks useful. But is there any way to define a CSS class for use on that post option other than to go and add a theme-wide ...
0
votes
1answer
22 views

Add a button to the toolbar of an existing Gutenberg block

I would like to extend the default image block and add an option to it. The idea is to have an extra option to download the image locally if it is a remote image. Is this possible and how ? Thanks.
1
vote
0answers
9 views

reload the gutenberg editer on taxonomy change

I have some custom blocks that are driven via a custom taxonomy so I need a way to reload all blocks (or just some) when the tax changes
1
vote
1answer
27 views

How to make 2/3 width column in Gutenberg

I created a 2 column layout block, gave the columns block a CSS class of .first-col-2-3 and added this CSS to my theme: .first-col-2-3 > div:nth-child(1) {background:red;width:67%!important;} ....
0
votes
1answer
68 views

Gutenberg Custom Style problem with background image

When calls theme's style.css file with add_editor_style inside gutenberg, background images are not loading properly. Lets say: #intro { background: url(assets/main.png) ; } Its working ...
0
votes
1answer
17 views

Wrap shortcode inside custom block

I use this shortcode very often: [foo]123[/foo]. I'd like to drag and drop a custom block in the block editor, instead of typing the shortcode (and making typos). So how do I create a custom block, ...
0
votes
2answers
47 views

How to reload data stored for a sever side gutenberg block in the editor

I am trying to create some "cards" to show data from another CPT so I need to store the post ID as part of the block. The code below has a select in the sidebar which allows you to select the post ID ...
1
vote
1answer
14 views

Align Group blocks left or right

I'd like to right-align a Group block within a wide column. Is there a way I can get the Groups to show the same alignment options as an Image block does? Group blocks by default only provide "Wide ...
0
votes
1answer
32 views

Your site doesn’t include support for the block… after registering a block

I am getting the message: Your site doesn’t include support for the "mcm/menu-card-section" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it ...
0
votes
0answers
13 views

Using Atomic Blocks Accordion block and I keep seeing a “No Categories” text underneath it when using bullets [closed]

I am trying to add content to one of my pages on my WordPress site using the Gutenberg Editor via Atomic Blocks. When using the accordion block and adding content under it with an unordered list, I ...
0
votes
1answer
28 views

How to populate a select field with post titles/ids in a block

I need to build a really simple block with just one select field. This select field should be populated with the titles/ids of posts of a specific post type. Once a user selects one post from this ...
0
votes
0answers
12 views

How to add a custom image to the Social Links block?

I have added in the Social Links block to my website, including YouTube, Twitter, Facebook, etc. However, I want to add one for Minds.com and a few other sites but don't want to use the default link ...
0
votes
1answer
23 views

Block that renders html saved in a php file

I have an html snippet saved as a php file (e.g. mywidget.php): <?php if (!defined('ABSPATH')) exit; ?> <div> foo bar baz </div> In a separate file mywidget-block.php, how can I ...
0
votes
0answers
5 views

Custom block - check if post exists

I have custom block with saved attr of post ID. How can I verify from block definition that post with that ID exists in Wordpres. My aim is to warn user if post with saved ID exists no more.
0
votes
0answers
11 views

Theme options missing from edit page

I'm still somewhat new to WP, so I apologize if this is an obvious thing I'm missing. When I click to edit or create a page, I seem to remember that I would get a page with all sorts of options, and ...
0
votes
0answers
127 views

Gutenberg featured image checkbox - checkbox not correctly set on editing page reload

I've followed a tutorial to get a checkbox displaying under the featured image of a post that is being edited using Gutenberg. It's a checkbox to allow the editor to control whether to display the ...
0
votes
1answer
26 views

What is the name of the user capability to read a reusable block?

I have a custom post type and want a custom user role (I named it subscriber_modified) (based on subscriber) to also have the ability to view and add reusable blocks as they are editing the content of ...
1
vote
0answers
21 views

Wordpress CPT save metadata in gutenberg

I'm trying to wrap my head around the new sidebar api vs metabox issue when trying to come up with how to save metadata for a custom post type. I've got a couple websites I'm going to be creating that ...
1
vote
0answers
21 views

Extend core block attributes in post content

I need help with adding attribute 'caption' of core/image block into saved post content. Currently saved attributes look like follow: <!-- wp:image {"id":36,"sizeSlug":"large"} --> I aim to ...
0
votes
0answers
21 views

Group block without inner wrapper

When I use a "group" block it automatically adds an inner wrapper: <div class="wp-block-group"> <div class="wp-block-group__inner-container"> ... </div> </div> I don'...
0
votes
0answers
38 views

How to use the standalone block-editor

I would like to use this package in my plugin: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor The Usage section says this: import { BlockEditorProvider, BlockList, ...
0
votes
0answers
25 views

Gutenberg, convert RichText to InnerBlocks

I have custom Gutenberg block with MediaUpload, PlainText and RichText blocks. I need to enable option to add list to RichText block without losing or updating content in blocks. I think that I need ...
0
votes
1answer
23 views

How to nest a list inside a blockquote using the Gutenberg block-editor?

WordPress Gutenberg block-editor don't allow to paste an HTML list inside a blockquote. It transforms it arbitrarily in a series of <p> tags, which is not semantically what I want. I've found ...
0
votes
2answers
51 views

How can I have a common background color across multiple WordPress blocks?

On a WordPress page I have a number of H2 headings followed by some text. I'm trying to group all these blocks along with a common background color so that it looks neat and organized. Here is a ...
0
votes
0answers
18 views

Use PHP templates as blocks

I need many "Reusable Blocks", but creating and maintaining them takes too long. I'd like to do this: create a PHP-based "template" file, e.g. wp-content/foo/bar.php create a page in the block ...
1
vote
0answers
28 views

Gutenberg Blocks doesn't render correctly when using do_blocks

I'm trying to render a post_content with blocks using the do_blocks function, that takes a gutenberg content, parses every block, and returns an HTML string. The problem is that some blocks aren't ...
1
vote
1answer
18 views

Rename reusable blocks shown in navigator

I have a number of reusable blocks. In the block editor, when I popup the navigator, all those blocks are called "Reusable Block". This makes editing a document difficult. Is there a way to name ...
1
vote
0answers
16 views

Set image size on media and text block with a function

I'm using the Media & Text block within Gutenberg. You can adjust the size of the image by dragging the small blue circle: Looking at the Media & Text settings on the right, it doesn't look ...
2
votes
1answer
196 views

WordPress adding scaled images that don't exist (1536x1536 and 2048x2048)

I'm building a theme in _S and using native Gutenberg blocks. I have the following code via my functions.php file to set my image sizes: add_theme_support( 'post-thumbnails' ); add_image_size( '...
1
vote
0answers
19 views

How to handle Gutenberg wp.data async errors?

When using wp.data.select('core').getEntityRecords(...), there is a special selector for loading states wp.data.select('core/data').isResolving(...). But what about actual errors -- backend validation ...
1
vote
0answers
17 views

Don't expand “Most Used” accordion item when adding new block

In the block editor, when clicking to add a new block, the popup shows an accordion with the first item expanded ("Most Used"). How can I change it so that all the items are initially collapsed?
2
votes
0answers
22 views

Gutenberg Blocks - Attributes from comment delimiter or from HTML?

I wrote a custom block and am trying to better understand the interplay of the JavaScript and PHP on both front and back end regarding blocks. Say I have some block that I want rendered dynamically. ...
1
vote
0answers
23 views

Gutenberg block outputting JSON in front end - is this normal?

I have a custom block that modifies an Ultimate Add-On Gutenberg Section Block, so that I can define section types, such as exercise and apply some custom formatting. I noticed on front end my ...
1
vote
1answer
41 views

create bootstrap columns inside editor group block

According to this answer I'm trying to use the new default block editor of wordpress to set the bootstrap classes on the content of the blocks. I'm using the group block to set the container and ...
1
vote
1answer
63 views

Delete a Gutenberg Block Programmatically?

I was wondering what is a good approach to remove a Gutenberg block programatically. I have a custom content type where I have the option to choose a forum post via a select field that I added via ...
1
vote
1answer
31 views

Create custom blocks for bootstrap

I'm reading the tutorial on how to create blocks for the Gutemberg editor. I want to implemente the bootstrap 4 grid, but I'm a bit confused on how to proceed. Can anyone explain to me what's the ...
2
votes
0answers
14 views

Text Editors Are Hiding Text

When I bring up an existing Page or Post, the Gutenberg Editor displays the title, then flashes the text as if it were confined to the left side of the edit panel, then the panel goes blank (with a ...
1
vote
1answer
15 views

Change default colors in paragraph block settings

I need to have the client's theme colors here so he doesn't have to remember the color codes each time he's using them. Is is there any way to Add/Remove/Change some colors from the default "...
2
votes
2answers
116 views

Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?

While working with ServerSideRender wordpress gutenberg component, I am seeing the following notice. wp.components.ServerSideRender is deprecated. Please use wp.serverSideRender instead. Here is my ...
0
votes
0answers
30 views

Showing Modal in Gutenberg Save Method

I have custom post type which is "persons" I am getting these custom post types using Wordpress API and withSelect method. I am also using semantic-ui-react for my User interfaces. edit: withSelect( (...
0
votes
1answer
28 views

Override RenderCallback from LatestPosts

I am creating a wordpress website based on materialize css and i am trying to populate latest posts in my home page. I did setup the Latest Posts in guttenberg editor. To apply the card effect, i ...
0
votes
0answers
21 views

Gutenberg running code only available in front end within shortcode

In a pre-Gutenberg site, I have a shortcode with roughly the following structure: function generate_new_member_form() { ob_start(); ?> // a form // to generate this form there is some ...