Skip to main content

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

Building my first ever Gutenberg block

I have created a Gutenberg block using the following command: npx @wordpress/create-block test-block --template @wordpress/create-block-tutorial-template Reference: https://developer.wordpress.org/...
Subrata Sarkar's user avatar
0 votes
1 answer
14 views

Hard code block with nested block in front-page.html template

I have two working blocks hero Carousel and hero Carousel Slide. When I hard code these blocks in the template file they do not appear nested in the editor. In the editor, I am able to drag and drop ...
pjbrusven's user avatar
0 votes
1 answer
27 views

My block plugin break causes "an unexpected error in the block editor"

I created a block with the wp-create-block, but somehow it causes errors. The block and the code is available on Github It can transform to and from a Group block, but when I create group and try open ...
Audun Myhra Bergwitz's user avatar
0 votes
1 answer
24 views

Activate Gutenberg group block for theme

I using the Timber Starter Theme for my website and would like to group multiple blocks through the Gutenberg block editor. Unfortunately, the group option isn't available. I'm wondering what needs to ...
obs's user avatar
  • 101
0 votes
0 answers
9 views

Can't override individual Button Style once I have set a Global Style in the Full Site Editor

I want my button blocks by default to have uppercase text, but for the user to be able to select individual buttons to be lowercase. In Global Styles (Full Site Editor > three dots top right > ...
Sarah's user avatar
  • 435
0 votes
0 answers
17 views

Why is my Gutenberg block not saving and rendering the chessboard?

I am building a Gutenberg block where the user will place the PGN code (chess game notation) inside the RichText field. On the frontend, the game's code will be embedded inside a chessboard library ...
JayDev95's user avatar
  • 179
0 votes
1 answer
26 views

Define how an attached image is rendered

When inserting an image block to a post, I want to control how the image is actually insterted in HTML. Specifically, I want to replace the autogenerated img element with a picture one, in order to ...
dgnin's user avatar
  • 143
0 votes
0 answers
22 views

How to add multiple custom blocks in custom Wordpress theme using create-block?

I want to add multiple custom blocks to my custom wordpress theme using create-block package. In my root folder I initiated package.json by running npm init -y and added wp-scripts as a dev dependency....
chupapimuyanya's user avatar
1 vote
0 answers
69 views

How to transform a shortcode into a block

I've built the following Gutenberg block. It's a carousel of images: /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; import { G, Path, SVG, ToolbarGroup, ...
leemon's user avatar
  • 1,928
0 votes
0 answers
24 views

Implementation of React-Datepicker component with Gutenberg in Wordpress

I'm working on a custom plugin that require an daterange picker control in a custom post type sidebar. Since I'd like to use Gutenberg for this (state that I'm quite a novice in React & Gutenberg ...
Paolo Sacchetti's user avatar
0 votes
1 answer
20 views

blocks.getSaveElement not working for core/social-link

Why blocks.getSaveElement is not working for the core/social-link ? Is it because it is child of the core/social-links ? When I modify example from the https://developer.wordpress.org/block-editor/...
Tahi Reu's user avatar
  • 238
0 votes
0 answers
15 views

Adding features to Gutenberg without theme.json

I am using a non-block theme for my website and am using Gutenberg for writing posts. I want to extend Gutenberg's functionality by adding the image lightbox feature. So I added a theme.json file to ...
Ryan's user avatar
  • 1
0 votes
0 answers
17 views

Default value for highorder component in Gutenbrg?

I'm trying to add an additional setting to core/group component. Is there a way to add default value to const withSidebarSelect = createHigherOrderComponent( ( BlockEdit ) => { return ( props ) ...
Runnick's user avatar
  • 1,009
0 votes
0 answers
11 views

Disable block editor pre-publish sidebar for custom post type

I'm trying to disable pre-publish sidebar in the block editor programmatically for a specific post type. I use the following code to disable globally and it's working fine but struggle to disable it ...
Christopher's user avatar
0 votes
0 answers
23 views

Custom gutenberg block: window.wp.blockEditor returns undefined

I have an issue with creating a block. After I build my code, it always gives the n is undefined in the block editor when I try to put the block in with the console pointing the problem to the <...
Frenzy's user avatar
  • 1
0 votes
0 answers
24 views

Registering a custom block style

I’m working on my first block theme and it’s giving me a lot of fun. I see there is a registered style in the block style tab to change the background image of the “row” block.. see the attached image ...
thara's user avatar
  • 1
2 votes
1 answer
52 views

Programmatically convert single classic block to individual blocks via PHP

I am creating some posts via the wp_insert_post() function. When doing so the content gets saved in one big classic block. Is there anyway to force it to save as individual Paragraph blocks instead?
Tommizzy's user avatar
0 votes
1 answer
24 views

How can i extend the existing Block Inspector Tabs in Wordpress Gutenberg Editor?

With <InspectorControls> i'm able to extend the WP Gutenberg Sidebar but i want to extend the default tabs like in this picture: How can i create my own sidebar tabs?
Sam Weiss-Gamtschi's user avatar
0 votes
1 answer
19 views

The enqueue_block_assets is changing the styles of the editor interface

I am ensuing stylesheets that are supposed to be used by a theme in the iframe from the editor and on the front end. Some of the css contains styles for html tags such as H1, H2 etc.. body { ...
Walrus's user avatar
  • 131
0 votes
0 answers
20 views

How to add a class to a core block in both admin editor and frontend?

I'm having huge difficulties with the forced styling bundled in WP (using hybrid themes): body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: ...
lepardman's user avatar
  • 315
0 votes
1 answer
25 views

Get generated block styles programmatically

If you use wp_head() in the header of your theme Wordpress generated a style tag for the Gutenberg block editor. Who knows how you can get the generated css style tag with the styles without using ...
Ruudje's user avatar
  • 21
0 votes
1 answer
52 views

How can I add a wrapper class to individual blocks inside of an InnerBlocks component?

Basically I'm working on a custom gutenberg block that utilizes the InnerBlocks component to generate a slider based on any blocks entered. So my save.js looks like this import { useBlockProps, ...
itsseanl's user avatar
0 votes
1 answer
19 views

Translations not making it into Block UI but work in the rest of the plugin

I'm currently flummoxed by a translation issue I've run into with a Block inside of my plugin. Both myself and the developer who did most of the work on the Block portions of the plugin have been ...
Jamie Poitra's user avatar
0 votes
1 answer
11 views

Custom Gutenberg block within column block selection and update issue

I’m making a custom gutenberg card block When I put the card block within another block like a column I’m having issues in selecting and updating it This video shows the card block within the column ...
Grzes Slania's user avatar
0 votes
1 answer
26 views

Consistent inline styling in a Gutenberg-paragraph-block

I have a question, and I am really sorry when it has been already asked (and answered) - but I am researching for hours now and I can't find the answer. Although...somehow I can't believe it, that ...
webwurm's user avatar
0 votes
0 answers
20 views

Block Editor - Wordpress 6.1 - CPT Archive Issue - While the title changes in the loop, all records display the same data

I am using the block editor with CPT. I have a loop that iterates though my CPT. The title changes for each record but not the data in the CPT. I am using a shortcode to display my custom post type ...
spreaderman's user avatar
1 vote
1 answer
32 views

Wordpress Gutenberg Custom Block the viewScript does not get loaded on the frontend when my block is inserted

I recently developed a custom Gutenberg block by utilizing the @wordpress/create-block package, which effectively generated a full plugin framework. I simply needed to tweak some existing files to get ...
Daniel V.'s user avatar
  • 131
0 votes
1 answer
52 views

Gutenberg Group block missing Layout options

I have a simple question I was not able to fix. My gutenberg block is missing the Layout options in its settings. I tried to enable via add_theme_support or theme.json but I can't find anything that ...
celsomtrindade's user avatar
1 vote
0 answers
16 views

Registering a block in "My Patterns"

I have created a bunch of blocks, and every time I have saved it as a pattern by selecting the block in the list view > three dots > Create pattern. All these patterns appeared in a new category ...
willywilly's user avatar
1 vote
0 answers
20 views

Custom gutenberg block refuses to load viewScript and I don't know why

I've been struggling with this for hours. I used the @wordpress/create-block package to generate a template for me to create my first block. I've managed to create a hero block with an image uploader ...
Daniel van der Velden's user avatar
1 vote
1 answer
76 views

Can I use Post Thumbnail with Block Bindings API

I have a pattern template for a custom post type which uses the Post Thumbnail Block as a placeholder for the thumbnail when/if it is set. However the Post Thumbnail Block does not support opening the ...
lepardman's user avatar
  • 315
1 vote
1 answer
12 views

Preventing Output of Layout Styles but Keep the Layout Classes in Core Block Editor

I am creating a block theme where the CSS styles for block layout support get included via the theme stylesheet files. To opt out from WP printing all the styles for separate blocks, I set support for ...
JHoffmann's user avatar
  • 1,850
0 votes
0 answers
32 views

Not allowing my site to be embedded elsewhere via oEmbed

Kind of "bizarre" question here. Is there a way to disable the possibility of embedding (via oEmbed) my site elsewhere and instead having only the URL shown? If you copy a URL into the block ...
Dande's user avatar
  • 25
0 votes
0 answers
85 views

how can I remove all default settings in Gutenberg blocks? example core/button

I’m expanding the capabilities of the default Gutenberg block (core/button) and want to hide all the default settings. This code helps to hide all settings except 1 //functions.php function ...
YuriiMy's user avatar
3 votes
1 answer
61 views

How to add group-row to InnerBlock template?

We are trying to add a group-row to our InnerBlock template. Now there is a core block called core/group which works when being inserted. The core/group has variations as group-row. But when inserted ...
user241943's user avatar
1 vote
1 answer
82 views

Output HTML Tags In Gutenberg Block

I've been working to update our custom gateway plugin to make use of the block checkout in WooCommerce. I have managed to get the gateway to output but one of the settings fields we have takes raw ...
Burgi's user avatar
  • 403
1 vote
0 answers
52 views

Disabling blocks in the Gutenberg block Inserter

I want to disable blocks based on some condition eg. An instance of that block is already present in the InnerBlocks (duplicate block). When the user opens the inserter (Quick or in the sidebar ...
f00d's user avatar
  • 11
1 vote
1 answer
30 views

Is it possible to create dynamic templates for block themes directly from the site editor?

For example, you can create a posts template within the site editor, but how do you make it so that the content for each respective single post displays dynamically? Here's my single post template ...
WPdummy's user avatar
  • 23
1 vote
1 answer
70 views

Gutenberg Static blocks: viewScript doesn't import css for frontend?

I am building static block slider (Swiper JS). Used wordpress/create-block https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/. Besides importing the JS & ...
Ion T's user avatar
  • 25
1 vote
0 answers
9 views

Create error handling metabox fields WP block editor / rest mode

I need some help with the rest mode error handling in WP. In my CPT I use a metabox with different fields. If the user save the post there must be an error handling on the metabox fields. With the ...
Ruudje's user avatar
  • 21
0 votes
0 answers
13 views

Latest Wordpress Version Changes to Block Editor Template

With the latest version of WordPress I noticed that I'm not able to change the template file based on the custom page templates that I've made when I'm on BLOCK EDITOR mode. I am ONLY able to change ...
user242254's user avatar
0 votes
0 answers
8 views

Is Woommerce Gutenberg checkout block editable?

I have site where Gutenberg Checkout Block is using for checkout page. I couldn't edit checkout with hooks neither with other plugin for editing checkout fields. Is it possible to make changes into ...
Ustym Rado's user avatar
0 votes
1 answer
37 views

How disable settings on core/image (Gutenberg) block

How disable settings on core/image (Gutenberg) block
Dimitri kvachakhia's user avatar
2 votes
2 answers
235 views

Remove or disable Appearance > Patterns

Not sure quite when, but a recent WordPress release has added a new WP Admin link under Appearance for Patterns: My themes don't use Gutenberg, and I've disabled it. But the Patterns screen is still ...
doofusb0y's user avatar
0 votes
0 answers
31 views

How can I filter Query Loop to show only posts in current category?

I am migrating a site from a page builder to a block theme. In my main post template I want to list other posts in the same category as the current post, excluding the current post itself. In the page ...
J Glasshalfpool's user avatar
0 votes
0 answers
11 views

Unable to trigger a frontend @wordpress/hooks action

I’m trying to implement a frontend WC block hook, but unfortunately I’m not able to trigger it. I’m using a fresh 8.7.0 install, and blocks are definitely enabled. I’ve tried following the ...
Dylan Pierce's user avatar
0 votes
0 answers
43 views

How to create a template for a post in Query Loop block?

Let's say I want to use WordPress' block builder to construct a page, and for one of the sections I use the Query Loop block. In the "List View" (layers panel sidebar) I can add and remove ...
Dane Rossenrode's user avatar
1 vote
0 answers
9 views

Can I use the Query Loop as a component-dependency inside my block?

I am trying to make use of the core/query's capabilities in my block. Unfortunately, registering a block variation forfeits any control over what's output anywhere - the edit/save no longer work, ...
Jonathan's user avatar
0 votes
1 answer
33 views

Allowed blocks for core/column

I'm new to the world of Gutenberg blocks. A customer has a special need to restrict the allowed blocks that can be used inside core/column block. The editor should only be able to select a small part ...
Acer82's user avatar
  • 1
0 votes
1 answer
28 views

Is there a standardized way to get data inside my Dynamic Gutenberg Block?

I'm building a featured posts block. I'd like to have a 1:1 preview of the rendered front-end in my editor, so that the experience isn't disconnected. I have my basic block setup, attributes are ...
Jonathan's user avatar

1
2 3 4 5
39