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
1
vote
0answers
13 views

Set default terms for new posts / CPTs

I want to set default taxonomy hierarchical terms for NEW posts or CPTs. That is, I want the term's checkbox to default to checked - visually - in the post-new.php editor before it's saved or assigned ...
0
votes
1answer
23 views

Gutenberg Shortcode Fail

WP 5.2.2 Is it possible to render a shortcode outside of the gutenberg shortcode block? I created a shortcode and have been using it on a couple of pages for years. It works great on those pages... ...
1
vote
1answer
58 views
+50

jQuery selectors for editor elements safe to use?

Let's say I want to monitor all the editor blocks. In the standard editor (5.2.2) I can just select the blocks with e.g. $("div.wp-block"). Will this work across plugins etc or will some plugins alter ...
1
vote
1answer
35 views

How to serialize a Gutenberg block from block attributes in PHP?

I am writing a migration script which has to read the post_content of posts and then dynamically change some attributes of some custom Gutenberg blocks. I was able to read the post_content and then ...
0
votes
0answers
28 views

Getting ACF Field in Page - From the Footer

I'm trying to get ACF field that is part of an ACF block in a Page I've created, say "Home Page". I'm trying to do this from the footer, but with no success. I've tried the following: I got the "...
0
votes
0answers
17 views

Gutenberg Development vs Release version?

I have a question about using Gutenberg Development version vs the release version. I am currently using the development version as it has some features still not available on release that are of ...
0
votes
1answer
21 views

Can't get Gutenberg InspectorControls to work

I try to create a block and I wanna use the InspectorControls, but I can't get it to work. I know its deprecations/moved to wp.components.* (https://developer.wordpress.org/block-editor/developers/...
0
votes
0answers
8 views

Resizing images on page

I'm having problems resizing a lot of the pictures in my page. For instance, using a "cover" image lets me resize the width but the height remains the same, no matter what I do. I have tried the ...
0
votes
0answers
11 views

Controlling the RichText component outside of blocks

Still cutting my teeth with React and the Gutenberg components. While I've managed to write custom blocks thanks to the docs and other tutorials, I'm now stuck on this latest challenge. I'm trying to ...
0
votes
0answers
27 views

Custom block update rendering when reused

First question here! I'm an experienced WP developer, but pretty new to React so my vocabulary might be a little off... I developed a custom (Gutenberg) block that have to update is content on almost ...
0
votes
0answers
18 views

Any way to get more space for editing post excerpts

Using latest WP with Gutenberg. The excerpt metabox is (as you'd expect) over in the right column with the Document settings. Is there any way to get it out of that column and into the main area ...
0
votes
1answer
16 views

When to use removeEditorPanel()

I'd like to remove the Discussion Panel in the post editor sidebar with removeEditorPanel(). I'm trying to do the following: const { removeEditorPanel } = wp.data.dispatch( 'core/edit-post' ) ...
0
votes
0answers
17 views

“Updating failed” if any text includes “$v()”

If I include any of the following sequence of characters anywhere in any block in Wordpress, I get the red "Updating failed" error when I try to save the draft. $v() $xyz() $x () Any variety ...
1
vote
1answer
11 views

React to a change of the block alignment

So, I have a Gutenberg block that has a custom component inside, that needs to be refreshed if the dimensions of the block change. However, apparently there's no way for me to detect when the ...
0
votes
1answer
12 views

How do I make sure the gutenberg block CSS is not disrupted by generic styles?

I am working with a pre-existing theme. On the site in question, the style sets rules for P tags. These rules are applied in preference to the class styles for P tags used in certain blocks. (With the ...
1
vote
1answer
31 views

Gutenberg Block Get Author Details

How do I pass author details such as name, bio and avatar to a block?
2
votes
0answers
11 views

Change list of allowed headline levels in Gutenberg

is there any way (eg. a hook) to disallow some headline levels in Gutenberg. For example, I would like to disallow a user to use H1 level. By default, headline levels H1-H6 are visible. I wasn't ...
0
votes
0answers
21 views

Custom Image Gutenberg Block With Caption

I have created a block that wraps the <img> in a <div> so that I can style a scrollable image. It all seems to be working. When I save the caption it appears to be saved on the Frontend ...
0
votes
1answer
25 views

Gutenberg custom block: RichText underline button

I am working on a custom block for Gutenberg and part of this block is a RichText component. I am trying to add a button that underlines the text and I cannot make it work since last night. The code I ...
0
votes
1answer
9 views

After Update Advanced Gutenberg Plugin - advgb/container site does not support block

I update Advanced Gutenberg plugin. I had create page which use container block. After updating the plugin, I can not edit the page because the site does not support block "advgb/container". How ...
0
votes
0answers
22 views

Add a button to the Gutenberg editor header

Hi There I want to add a button to the header of Gutenberg editor, in the place displayed on that picture here: One solution is to use javascript, but I am wondering if there's some kind of filters ...
1
vote
1answer
24 views

Can you filter posts by meta key with the getEntitityRecords selector?

As my first foray into WP5-era theme development I am trying to develop blocks to replace where I would normally use shortcodes and a metabox plugin. After a lot of learning I have finally managed to ...
0
votes
0answers
22 views

Implementing Scrollable Images

Sorry if this question derives subjective answers. I figure that asking on WP-SE makes this a little more forgivable. If I had asked on SO I would have had to explain why I couldn't change the block ...
0
votes
0answers
13 views

Run PHP on Gutenberg blocks of Twenty Nineteen theme

I'm trying to use Twenty Nineteen to reproduce my website, using a more up to date theme and taking advantage of Gutenberg blocks philosophy. In my original website I have used many of <div></...
1
vote
0answers
23 views

How to hide meta block(s) in certain post format

As in wordpress Block Editor Handbook I added a "meta block" to my theme, and it worked, function duke_blocks() { wp_register_script( 'wb-blocks-js', ...
1
vote
0answers
24 views

Use a React Component in conjunction with Blocks

I want to use a React Component which renders child items. The rendering of the children is bound to an array of objects of the component which holds the information for each item. So my idea is to ...
1
vote
0answers
14 views

Use gutenberg block editor on plugin page (outside of a post)

I'd like to use the block editor to manage content of the site-wide footer. With the classic editor, I simply need to register a plugin page and add a field that's just a wp_editor instance. I recall ...
0
votes
0answers
13 views

Front and Editor styles in one file?

I've got a lot of custom stuff to style inside my current project ( first one made with Gutenberg) and editing two files (that include a lot of media queries) makes the task deeply infuriating. Is ...
0
votes
0answers
28 views

Wordpress Gutenberg Ajax request

I'm new to react and gutenberg so kind of lost a bit. I am trying to get an array of posts from a custom post type. Then loop through those posts and register a block for each one. I can everything ...
0
votes
0answers
18 views

Using SVN to upload plugin created with gutenberg blocks

I created a plugin using Gutenberg blocks. I have a node_module folder because its using dependencies like Wordpress components. The plugin folder size is about 100 Mo. I tried to use SVN to commit ...
0
votes
0answers
9 views

How to get all gallery blocks in wp_query like get_post_gallery()? [duplicate]

before Gutenberg I could query for all galleries in my blog with this: $the_query = new WP_Query( $args ); while ( $the_query->have_posts() ) : $the_query->the_post(); echo ...
0
votes
1answer
29 views

How to import Reusable Blocks programatically?

How to import Reusable Blocks programatically? I would supply 20 or 30 .json files with Reusable Blocks and the theme admin would be able to use them in their posts or pages. How could I import them ...
0
votes
0answers
31 views

User Role Capabilities for WordPress Gutenberg Blocks

As I am switching from ACF to Gutenberg, I am looking for a possibilty to set specific capabilities for my users. In my common projects, my clients and content managers usually have "Editor"-Accounts ...
0
votes
1answer
24 views

Expose Gutenberg blocks in Post Revisions API endpoint

I am working on a WordPress project with a headless front end, and am looking for a way to expose the individual post blocks when hitting the revisions endpoint. https://developer.wordpress.org/rest-...
0
votes
0answers
18 views

Gutenberg Block: Render Shortcode

I'm working on a WordPress plugin using cgb-scripts to create blocks. That makes development very easy, though there is hardly any dynamic blocks support. I found out, that when creating a block I ...
0
votes
0answers
18 views

Cannot Create A Page or Post in WordPress 5.2.1

I am using the Gutenberg Editor, and when trying to create a new page to publish, I get: Publishing Failed. Debugging using the console gives me: 13?_locale=user Status: 403 (in red) Type: fetch ...
0
votes
0answers
6 views

Editor width automatically reduced - text is wrapped after 1 character

I have created several blocks using the wordpress editor. When I first create them, everything looks fine. When I revisit the editing page after some time, the width of the text block has shrunk ...
1
vote
0answers
22 views

How to have meta boxes save via REST in Gutenberg?

I have a number of meta boxes added to a site I'm building, and would like to have their data saved via the REST API rather than have the post save "twice" in Gutenberg (once via REST for the basics, ...
1
vote
1answer
19 views

How to allow your custom widget as block in gutemberg editor

I would like to add a widget in gutemberg as block like this : Is there a way to do it instead of using a shortcode ?
0
votes
1answer
19 views

Make a custom block like default paragraph block, so that Enter starts a new block

I have been trying to make a custom block that will behave like the default paragraph and headings blocks, so that when Enter is pressed a new paragraph block is started. Whatever I try, a tag ...
0
votes
1answer
36 views

Gutenberg table block with Bootstrap .table class

On my frontend I am using Boostrap 4, however Gutenberg block table has class <table class="wp-block-table"> so instead of creating new table style it would make more sense to append the ...
1
vote
0answers
27 views

Stop WordPress editor embedding links

There are several posts about this, - but I suspect that it has changed after Gutenberg, since I can't get either of the methods to work. I'm trying to stop WordPress embedding links, when written ...
1
vote
1answer
60 views

Custom gutenberg block not rendering with styles on frontend

I've registered a custom block that's basically a wrapper for other content with some background color options. Here's my registration code on the backend: function mytheme_register_box_block() { ...
0
votes
0answers
32 views

I need to block or redirect my wordpress admin access to my site visitors

I need to block or redirect my wordpress admin access to my site visitors I have block my wordpress backend access using itheme plugin but still i can access using this URL https://my-site.com/wp-...
0
votes
0answers
24 views

Adding Popover to BlockControls

I'm trying to add a button to BlockControls and display a Popover. I have tried various different methods - none of which work. I am hoping I am close with this one but I get the following error: ...
0
votes
0answers
46 views

custom taxonomy not showing in Gutenberg

Gutenberg does not show our custom taxonomies in the editor sidebar. They have always been there using the classic editor. I have addressed the usual suspects (see below) but had no luck. Here is what ...
1
vote
1answer
21 views

Can I override a CPT template on a per post basis with Gutenberg block editor?

I have a CPT defined in code called event, and there is a template file for the markup (single-event.php). I am wondering if it is possible to override a post within the Event CPT with the Gutenberg ...
0
votes
0answers
12 views

Retrieving Gutenberg image block's caption

I have been trying to retrieve the image block's caption text to use in a PHP file. I understand Gutenberg (Block Editor) is relatively new so I haven't found any documentation on this topic. I have ...
0
votes
0answers
8 views

Disabling deleting reusable blocks except on the reusable block manager

I am using reusable blocks to add repeatable content on all my posts. This is not something that I can automate because the position varies from post to post. I have to edit thousands of all posts to ...
0
votes
0answers
8 views

Gutemberg image block adding link to homepage

We recently started using Gutemberg on a website we are slowly changing. Everything seemed great, until we noticed that the image block is adding a link to our homepage on every instance, even though ...