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

Align block editor

When working in the editor mode of Gutenberg blocks the editor field aligns fully to the left. So there is no space between text/images and the left side of the editor. This changed from one day to ...
Paul's user avatar
  • 1
0 votes
0 answers
6 views

Custom `BlockControls` button for multiple block selection of different types

When selecting multiple blocks of the same type, BlockControls displays the custom bell icon button. But when multiple blocks of different types are selected, it doesn't show: Is there a way to ...
Siddharth Thevaril's user avatar
0 votes
0 answers
15 views

Disable interactivity for core navigation

I want to disable the default interactivity behavior from the core navigation block. I tried the following: Load my block variation in the functions.php: function da_custom_block_variations() { ...
Der Alex's user avatar
  • 101
0 votes
2 answers
22 views

How to auto rename JS files to prevent browser cache issues

Im creating a block plugin in worpress and each time I update my JS files, changes do not reflect to frontend because there's a browser cache. I found some strategies in others frameworks that rename ...
Filipe Petter's user avatar
0 votes
0 answers
15 views

Correct way of implementing complex navigation in Gutenberg

I am a bit lost in creating a block theme. I have read a lot about theme development and block development in the wordpress documentation and also at fullsiteediting and have some kind of ...
Der Alex's user avatar
  • 101
1 vote
0 answers
18 views

Can I integrate Gutenberg on one page only?

We have WooCommerce now which is specially developed and we use a custom design. But we would like to use a page builder on the product page itself, so that we can set up, correct and add more easily. ...
Simon W's user avatar
  • 11
0 votes
0 answers
22 views

Block validation failed for React Component block that rehydrates after taking effect

I have this specific block than when I insert in the Editor, gives me this error: and the error states: Content generated by save function: <div class="data-props" style="display:...
neke90's user avatar
  • 1
0 votes
0 answers
19 views

Get_Template_Part and Template files in TwentyTwentyFour Block Editor

I am building a project using WordPress 6.6.1. I have opted to create a child them which extends TwentyTwentyFour and therefore relies on the new block editor which is packaged in that parent theme. ...
GRY's user avatar
  • 113
0 votes
0 answers
19 views

Can't save/get Patterns' `post_content` attribute

I am currently successful at getting the WordPress patterns via the following query: SELECT * FROM {$wpdb->posts} WHERE post_type = 'wp_block' Problem is, I realized post_content is empty, except ...
neke90's user avatar
  • 1
0 votes
0 answers
19 views

Problem making a WPQuery with ACF boolean

Well after hours and hours I find myself finally here, I am building a gutenberg block that is getting a custom post type data and making little cards with it, it works very well if I want to get: All ...
Cheoncio's user avatar
1 vote
1 answer
33 views

PHP Fatal error: Cannot redeclare distance() when making a new block

I created a ACF block. It calculates the distance from the displayed ski resort to the 3 closest ski resorts and displays a summary and is meant to use in a side bar or something. I have a function ...
spreaderman's user avatar
0 votes
2 answers
43 views

Full Site Editing, Block Theme, Gutenberg, Site Editor

With all the different names and ways to edit a WordPress site I'm a bit lost as how to future proof my theme. Let me explain a bit... First off, I use WordPress professionally at my job, I use it as ...
Jon's user avatar
  • 323
1 vote
1 answer
14 views

Preset category checkbox from URL parameter when creating new post

I have added custom "New Post" links to the admin menus and dashboard widgets in the admin panel to allow administrators/editors to post new content with the category preset when the editor ...
Mike Hermary's user avatar
0 votes
2 answers
26 views

How to "comment out" a block in Wordpress (make it invisible without deleting it)?

Is it possible to "comment out" a block in wordpress when using the block editor? I'm working on a wordpress site, and I want to temporarily make some of the wordpress blocks invisible to ...
Michael Altfield's user avatar
1 vote
1 answer
26 views

How do I completely disable block editor?

I am trying to completely disable block editing and revert the entire site to the "classic editor version". I have already tried the disable gutenberg plug in, and the classic editor plug in,...
K.Kessler's user avatar
0 votes
1 answer
27 views

How to add "double footer" in Wordpress block editor? [closed]

How can I add two footers on-top of one another in Wordpress? I'm trying to use the block editor to change the footer of my wordpress website. What I want is to have two footers that take-up the full ...
Michael Altfield's user avatar
0 votes
0 answers
12 views

"Update" button missing from block editor

The update button is missing from the editor page("Spectra"). I do not have any elements selected and yet the "Save" button does not change to "Update" button.
Daeshaun Morrison's user avatar
0 votes
0 answers
23 views

How do I apply different block supports to different parts of my custom block?

I am developing a custom block for my WordPress plugin. The block is meant to be very similar to the WordPress core search block. On the default search block, there are several supports declared, ...
ho88it's user avatar
  • 1
0 votes
0 answers
21 views

My home page is intermittently scrambled - any ideas?

I have created a Wordpress site using the block editor and Spectra One theme. It's all working fine but form time to time the home page is scrambled: Scrambled page: What it's supposed to look like: ...
user26162179's user avatar
0 votes
0 answers
11 views

Creating patterns with BlockArt

WP Dashboard crashes each time I try to create a pattern using a blockart element. I have a basic blockart element: Section with a Heading & Paragraph. When I click “create pattern” it says “...
php-b-grader's user avatar
0 votes
0 answers
31 views

Problem creating a two level list that is text only (not links)

Using the Gutenberg editor, I am trying to create a 2 level list using the list block. I want this list to behave as text-only bullet points, not as links. Each entry of the top level works fine, but ...
Robert-1059's user avatar
2 votes
0 answers
23 views

Using @wordpress/scripts 28.x with WordPress <6.5

I am currently looking for a way to use the current @wordpress/scripts 28.x in a plugin with WordPress 6.5 or older. According to the tip here, you should deliver the jsx-runtime via webpack, but ...
Thomas Zwirner's user avatar
0 votes
0 answers
15 views

Wordpress block based payment gateway showing - Getting Uncaught SyntaxError: Unexpected token '<' when printing html through js [duplicate]

I am updating existing payment gateway to support latest version of wordpress and also to make compitable with block-based checkout. I want to display multiple payment option list under my payment ...
user2130861's user avatar
0 votes
1 answer
45 views

How to display only the first 2 words of a post title

I am learning WP and want to display only the first two words of a post title to the user. For the end user only the first two words of the Post title (H1 class) should be shown but source should have ...
Prad G's user avatar
  • 1
0 votes
1 answer
37 views

Getting Uncaught SyntaxError: Unexpected token '<' when creating block based custom payment gateway [closed]

I am updating existing payment gateway to support latest version of wordpress and also to make compitable with block-based checkout. I want to display multiple payment option list under my payment ...
user246843's user avatar
0 votes
0 answers
40 views

Block Theme : Query Loop with attachments

I am new to wordpress development. These day I am trying to create my own block theme in wordpress. In my theme, I have added two file upload fields to default wordpress posts using ACF pluign. It is ...
thara's user avatar
  • 1
0 votes
1 answer
32 views

How can I obtain an option (get_option) inside a block viewScript?

If I traditionally enqueue a script... wp_enqueue_script('some-script', $dependencies_script_path, array( 'wp-i18n' ), false, $load_in_footer); I can use wp_add_inline_script to send info from ...
Iogui's user avatar
  • 141
2 votes
0 answers
124 views

Browser Crashes with WordPress Plugin SimpleTOC After Update to 6.6.x in reusable block

I am the creator of the SimpleTOC plugin for WordPress (SimpleTOC Plugin). After updating to WordPress 6.6.x (including 6.6.1), my plugin causes the browser to crash and freeze whenever the block is ...
Marc's user avatar
  • 687
0 votes
0 answers
22 views

Restrict Block from having a Parent or Ancenstor Block

I have a "custom/section" block with a template of "allowedBlocks" innerblocks eg. { children }. But have been unable to restrict the "custom/section" block from having a ...
dj.cowan's user avatar
  • 155
0 votes
0 answers
15 views

Add custom block to submenu variation

I've created a custom block, and with it, a block variation of the core sub-menu block that allows the custom block to be added to it. I can get the custom block to show up initially in the sub-menu ...
Jason's user avatar
  • 1
0 votes
0 answers
23 views

Gutenberg Dev - React Context.Provider returns undefined

I have a Context.Provider with a value setup in slider/edit.js. When I import it in the child component slide/edit.js with useContext it returns undefined I don't see what I'm missing here For context ...
Grzes Slania's user avatar
0 votes
0 answers
16 views

Customise "Add a New Post" page

I have a very simple question to which I am sure there is a simple answer, but after hours of searching I still can't find it. I am a professional programmer who has been developing themes and plugins ...
Michael Scannell's user avatar
0 votes
0 answers
47 views

Wordpress 6.6.1 - Trying to make a block but receive error, "! Cannot read property 'then' of undefined"

I am following this post. In the very first command I get an err npx @wordpress/create-block@latest todo-list npm ERR! Cannot read property 'then' of undefined npm ERR! A complete log of this run ...
spreaderman's user avatar
0 votes
0 answers
41 views

Style priority in theme.json

I have the following theme.json file in a custom classic/hybrid theme: theme.json file: "styles": { "elements": { "heading": { "color": {...
leemon's user avatar
  • 1,950
0 votes
1 answer
35 views

Avoid automatic scroll jump when dragging a resize handle in a Gutenberg block

I'm building a scrollable horizontal gallery block (Please, spare me the comments about scrollable horizontal galleries being bad from a UI perspective). The gallery may have a text at the start or at ...
leemon's user avatar
  • 1,950
0 votes
2 answers
59 views

FSE Change Post Template to Something Other Than a List

I'm currently building a hybrid theme and am having trouble with my post template. It keeps rendering as an unordered list when what I want is a div structure. Is there any way to change it so that ...
elkefreed's user avatar
  • 385
0 votes
1 answer
21 views

How to use useSelect to retrieve the currently default fontFamily?

I'm trying to identify where I could find this information but I've not been able til the present moment, to achieve it. I've been looking in core/block-editor and core/editor. I've been researching ...
Iogui's user avatar
  • 141
1 vote
0 answers
26 views

Extend WordPress Gutenberg core/navigation-link

Hey folks So Im pretty new to this react + php in wordpress and I found one article where it showed how to extend a core block, which works fine for group and some basic block but When i tried to ...
DevopsRedefined's user avatar
1 vote
1 answer
59 views

No aspect ratio selector in a custom block

I added the aspectRatio prop to the block.json file in a custom block that renders a grid of posts of a specific type: { "$schema": "https://schemas.wp.org/trunk/block.json", ...
leemon's user avatar
  • 1,950
1 vote
1 answer
177 views

Add custom data attribute to every core Gutenberg Blocks

I'm adding two custom attributes to core Gutenberg blocks, data-delay and data-duration. I want to add these attributes to manage animations blocks on my custom theme. I wrote this JS code into block-...
Stefano's user avatar
  • 33
1 vote
1 answer
24 views

Adding new Template Parts in the Block Editor when using Classic Themes

I am looking for a way for users (who will be site admins) to design Blocks that will be used by a plugin I am developing. I want the solution to work in both Classic and Block themes, so I have been ...
zcesl53's user avatar
  • 33
0 votes
0 answers
32 views

How do I highlight a Wordpress Menu Item for a page that is not on the Menu?

I am writing a Wordpress site using the block editor (Spectra One theme). I have a menu item called News. When I click on it the News page appears and the News menu item is highlighted. The News page ...
user26162179's user avatar
1 vote
0 answers
33 views

Block style variations not enqueued for blocks inside HTML code dynamically rendered via JS

The new WP 6.6 will let anyone style any registered block style variations in theme.json via the styles.blocks.blockName.variations property. Check the following post for more info: https://developer....
leemon's user avatar
  • 1,950
0 votes
1 answer
119 views

How to Programmatically Trigger the Update of a Post in WordPress?

I'm working on a WordPress project where I need to programmatically trigger the update of a post in the backend. The goal is to have WordPress process and update custom fields as if I had clicked the &...
Ahmed C's user avatar
0 votes
0 answers
18 views

How can I remove the wp_autop filter from a shortcode block in a block theme page template (twenty twenty-three)?

I am using a custom page template in the "twenty twenty-three" theme. I am using a shortcode block as part of the template. This results in the shortcode not running within "the_content&...
Scott H's user avatar
  • 31
0 votes
1 answer
215 views

Extending the Query Loop block

For client I need to create a simple 3x4 article grid that needs to have ads on fixed places instead of articles X .. X .. Y Y .. X .. X X .. X .. X X .. Y .. X in example above Y is ad, and X is ...
Kresimir Pendic's user avatar
0 votes
0 answers
9 views

Event when Modal is opened/visible

In my WordPress plugin, a Modal gets opened from within the Block Editor when a button is clicked. const MyContent = () => { const [isOpen, setOpen] = useState(false); const openModal = () =...
Abid's user avatar
  • 153
0 votes
0 answers
37 views

list all gutenberg blocks properties with icon name as well

function custom_blocks_api_get_blocks() { $blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); $block_data = array_map(function ($block) { return [ '...
Marko Krstic's user avatar
0 votes
1 answer
35 views

editPost without undo entry

I am updating my post status with following snippet: dispatch("core/editor").editPost( { status: 'draft' } ); My problem is, that this action creates a new undo-entry. Is it possible ...
Alex's user avatar
  • 3
0 votes
1 answer
27 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

1
2 3 4 5
40