Questions tagged [block-editor]

The Block Editor is the 'new publishing experience' introduced 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
10 views

Add a new option to Social Link block

The social links block does not have an option for Nextdoor. I obtained the SVG from the company: <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg&...
  • 113
0 votes
0 answers
13 views

How to get appender icon to appear more often for innerblock usage

I'm on WordPress 6.1.1 locally in my development environment. I referenced this article to setup an in improvement over innerblocks, by using useInnerBlocksProps. I can see my parent block "Team ...
  • 784
0 votes
1 answer
29 views

How do i get an Inline style in Gutenberg Block show up in front end?

I am trying to extend a gutenberg block. I have a color picker for my tab content background. At the moment, i can pick and change the background color on the backend, and it saves (refresh pa and ...
  • 3
0 votes
0 answers
5 views

Accessible 'List Carousel' block/pattern?

Trello has a really nice accessible 'list carousel' on their home page (under the heading 'A productivity powerhouse') where you click a feature block and it changes out the display image at right. ...
0 votes
1 answer
23 views

Some CSS classes missing when rendering the page with get_the_content()

I am using get_the_content() to load other pages content on the current page, and I noticed some block CSS classes are missing in the HTML I get. For example, is-layout-flex layout CSS class is ...
  • 186
0 votes
0 answers
17 views

Rearrange order of block into a block category gutenberg

Per example in the category "Media" I would like to display "banner" before "audio" because it's more useful for my webmaster. I'm looking for a solution like a filter ...
2 votes
1 answer
31 views

Errror generated in console leading to block validation failer

Within my custom block plugin, I am using create-block to generate my block environment for block editing. Within my `src/edit.js file I have the following setup... import { __ } from '@wordpress/...
  • 784
0 votes
0 answers
18 views

Wordpress block editor template parts not saving

I am having trouble editing my header and footer template parts on wp block editor (child theme 2022). I keep getting an error message "saving failed". I am building the site with elementor(...
  • 3
1 vote
1 answer
16 views

How to set the margin on an innerBlock in a block variation?

I am trying to define a block variation that has an innerblock with a margin. I was able to set the color of the innerBlock just fine, but for the life of me, I can't make the margin work. Here's what ...
1 vote
1 answer
14 views

Include a static block inside of a dynamic block

we have a collection of static blocks and we want to insert one of our statick blocks inside the PHP code of a different dynamic block but so far we didnt manage to do it: Lets say the static block si ...
  • 13
0 votes
1 answer
21 views

How to position more than one item over an image in a Gutenberg Wordpress block theme

I'd like to place two items over a large banner image, for example: Navigation menu (top-right) Site Title (bottom-center) I know a number of ways to do this with CSS, but can't figure out how to ...
  • 101
1 vote
1 answer
20 views

Error with RichText Component

WP Version 6.1.1 I'm not doing anything special as far as I can tell. When I add my custom block to a page, I type into it and on the second character, I get an Uncaught TypeError: Z is not a function ...
  • 420
0 votes
1 answer
30 views

How to add readable name and description to templates?

I created single-post-type-name.html in templates but they show up like this in the dashboard: Is there a way to have it like "Single Post Type Name" and also add a description like the ...
  • 153
0 votes
1 answer
23 views

Globally update pattern styles

Currently if we create a pattern in one page, and modify the styles, for example add some spacing, update margins and etc, they are not updated in other pages. I use a pattern called callMe which ...
  • 153
0 votes
1 answer
43 views

Wordpress.org UI: How do you make Bulleted/Numbered Lists indent by default?

When I am editing my Wordpress Post, it shows that my bulleted/numbered lists are indented. However, upon checking my website with the Preview button or via the live URL, it shows that my bulleted/...
  • 103
1 vote
1 answer
35 views

How to disable block directory?

I cant find a way to disable listing new blocks from the block directory in the editor. In the editor, if you search for something, third party blocks show up and ask you if you want to install them. ...
  • 153
0 votes
1 answer
27 views

How to add arbitrary custom CSS to a Wordpress Block Theme using Site Editor?

When using a Block Theme then you can use the Site Editor, accessible via: Wordpress Dashboard > Appearance > Editor. — Introduced in Wordpress 5.9 on 2022-01-25. Site Editor > Styles (right ...
  • 111
0 votes
1 answer
33 views

Dynamically add table of contents and add anchor based on heading innerHTML

I am looking to do the following:- Parse the blocks on a page and check to see if the block is a core/group block If it is, check the first innerBlocks is a core/heading (would be useful to achieve ...
  • 59
2 votes
1 answer
54 views

Localising a Block

I'm trying to localise my Gutenberg plugin and block, the PHP side is translated but zero luck on the js side. I tried the official guide, few other blog posts, the solutions posted in this post enter ...
  • 25
3 votes
0 answers
26 views

How to defer block.json scripts?

I'm currently using @wordpress/scripts, but it puts scripts in HEAD and doesn't defer them, which often it's a bad bad thing. I was trying to defer them by doing something like: // block.json { &...
1 vote
1 answer
37 views

Remove 'default' font option from Gutenberg typography settings

I've added my own font to the theme that I'm working on with the help of the theme.json file like this: "typography": { "customFontSize": true, "...
0 votes
0 answers
27 views

Editing Inline fonts/typeface using the block editor

I am attempting to modify the typeface when using the block editor. I see it is possible to change the colour of a single word/letter using the 'highlight' option found in the caret menu: In the ...
  • 59
0 votes
0 answers
15 views

Multi color post title by using custom javascript inside the gutenberg editor?

I'm just getting started with the gutenberg editor. I want the editing person to be able to select parts of the post title wich then opens a toolbar above the selected textpart letting you choose a ...
  • 11
1 vote
1 answer
49 views

What is the standard way to use the version of React that ships with Gutenberg on the front end?

I want to create a Gutenberg block that uses React on the client rendered page (not the admin pages). Is React code split from the rest of Gutenberg? If so, how can I enqueue that specific bundled ...
0 votes
0 answers
8 views

What methods are you using to transfer individual WP site components from one site to another?

We’ve built a moderately-large site consisting of about 500 pages, 60+ reusable blocks, a dozen page templates using GeneratePress Elements, etc. We need a way to transfer individual components of the ...
  • 190
0 votes
1 answer
18 views

Custom Gallery Block - Uncaught TypeError: setAttributes is not a function

I tried building my own custom gallery gutenberg block as shown here to get more familiar with the block structure. Putting all the code into a single file works fine, but when I try to split it up in ...
0 votes
0 answers
45 views

What is the proper way of using React Hooks in Gutenberg on frontend?

I'm mostly interested in useState. It works fine in edit.js, but in save.js it just breaks and it throws the minified React error, see below: I tried creating a separate .jsx component file but it ...
  • 101
0 votes
0 answers
27 views

Is there a way to delete "wp-block-group__inner-container" div from the gutenberg editor view?

Currently I'm in the process of matching the editor style to the frontend, in order to facility page editing for unexperienced users. I have removed the "wp-block-group__inner-container" div ...
0 votes
0 answers
13 views

When trying to run build script with gutenberg (with SVG import) - Error: Plugin name should be specified

I have a theme that is live and has some 10-20 custom gutenberg blocks, Those blocks sometime have svg imported to them like so import logo from './logo.svg' Today when I was trying to work and ...
  • 1
0 votes
1 answer
39 views

Customize margin between paragraphs using the Gutenberg Style editor

I'm using the new Styles editor to customize the theme. I would like to change the spacing between the paragraphs of the page and single templates. Is that possible?
0 votes
0 answers
26 views

Gutenberg core/file add style support in js/ json

I try add style support for file block in gutenberg. my code work for UL/li list: wp.blocks.registerBlockStyle('core/list', { name: 'blue-circle', label: 'Blue Circle', }); I try add: wp....
0 votes
0 answers
40 views

How can I prevent a user from selecting exactly one of two (not both or none) categories on a post?

I have Categories A, B, C, D and E. When creating a post, I want the user to be able to check of either A or B, but not one or both and 0 or more other categories. And I want Category A to be checked ...
  • 211
1 vote
1 answer
31 views

Full site editing templates folder vs block-templates

I have a modified Bedrock installation that moves the theme folder outside of the wp-content folder (and the normal app folder for Bedrock). In this setup, the app folder has a data folder that is the ...
  • 111
0 votes
2 answers
46 views

Display notice in block editor after wp_insert_post_data hook

I have a custom post type which checks and validates some (custom) meta fields added with it upon publishing. I am using wp_insert_post_data for the purpose: public function __construct() { $this-&...
  • 225
0 votes
1 answer
20 views

how to display gutenberg editor in a view

In a custom plugin, i display the content from a post in an editor like this wp_editor( $content, $editor_id ); but when the content is done with gutenberg , i want to display the gutenberg editor ...
  • 1
3 votes
1 answer
47 views

How to disable the Code Editor in Gutenberg?

While there already are similar questions around this topic I have yet to find anything about disabling the Code editor in Gutenberg permanently, for all users: Using Gutenberg is a must, so I'm not ...
0 votes
2 answers
37 views

With full-site-editing menus, how do I create a non-linking top-level menu item with linking sub-pages

I did this all the time pre-full-site-editing, back when we all built menus under Appearance. But without the Menu option under Appearance anymore, how do I do this? Is it only possible by way of a ...
  • 169
0 votes
0 answers
24 views

How to add Gutenberg editor on frontend page?

I have a textarea on a public-facing page. I want to add Gutenberg editor to that textarea. I searched the official documentation but couldn't find anything. Any information will be helpful.
0 votes
0 answers
14 views

How to change mobile menu (toggle) icon in Wordpress - Full Site Editing?

How to change mobile menu (burger) icon on Wordpress 6 using their new full site editing feature or possibly with some plugin? I would like to replace their default burger and close icons to add ...
0 votes
0 answers
81 views

Wordpress gutenberg block serverside rendering html elements not showing up

import { registerBlockType } from '@wordpress/blocks'; import ServerSideRender from '@wordpress/server-side-render' import {useBlockProps} from '@wordpress/block-editor' registerBlockType('fsm/...
2 votes
1 answer
53 views

Dealing with unknown option '--variant' when setting up a block environment

I'm on windows 10 with npm version 8.1.1, and node version 16.13.0 Within Visual Studio Code, I am in my plugins directory at the terminal. From the terminal when I type in npx @wordpress/create-block ...
  • 784
0 votes
0 answers
25 views

Where's the Block Template Feature in WordPress?

I'm working on developing a site for one of the Institutes under our organizational umbrella, and I've run into a situation where it'd be great to have a template with some blocks already in place ...
0 votes
0 answers
28 views

Gutenberg list items nesting and creating invalid content errors

I am trying to figure out why Gutenberg is creating nested lists instead of adding to the existing list, basically when the list block is selected I am able to make a single li element and then when ...
2 votes
1 answer
38 views

In Full Site Editing, how do I get the templates I created to appear in the site editor when populating a new page?

I have created a Page template in the Appearance > Editor after creating a Header template part. In this Page template, I set up columns, image placeholders, text and headline placeholders, page ...
  • 169
0 votes
1 answer
20 views

REST API error in block editor for custom templates

I'm working on a plugin that adds custom templates to WordPress for use with the active theme. The template files are located in a plugin directory and are being passed into WordPress with the ...
  • 1
0 votes
0 answers
20 views

Reinitiate Gutenburg's blocks using javascript

I'm developing a WordPress plugin that manipulates some Gutenberg blocks using javascript. For better understanding, create a table in a post and run the code below in the console: let tableHtml = ...
3 votes
1 answer
55 views

getBlockVariations(…) is undefined in Widget and Template Part editors but not Post Editor

I'm using this technique to hide various embed blocks: wp.domReady( function() { /* * Hide Embed Variations */ wp.blocks.getBlockVariations('core/embed').forEach(function (embed) { ...
  • 10.1k
0 votes
1 answer
31 views

Display a block conditionally based on user input button

I am looking to put 2 donation forms on a page using a shortcode (or block) and I want them displayed based on currency selected by user,So for instance a user comes onto the page he will see 2 ...
  • 101
1 vote
1 answer
41 views

In Full-Site-Editing, edits made to the code in a template part are not showing

I trying to get my head around FSE and template parts. I was able to create a header in the Gutenberg editor and copy the code to header.html. However, when I edit the header.html code directly in my ...
  • 169
0 votes
0 answers
59 views

Gutenberg block not displaying prop values

I created a simple Gutenberg block. When I use static values to display in both the editor and front-end it works but when I try to use dynamic values using props and attributes, after saving the post ...

1
2 3 4 5
34