537 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
39
views
Selected Custom Block Automatically Scrolls into View in WordPress Editor
I’ve developed two custom Gutenberg blocks — a parent block and a child block.
When a user edits a paragraph block inside the custom child block, the selected paragraph block automatically scrolls ...
0
votes
1
answer
65
views
How to display an error message in Gutenberg when a duplicate slug causes a post to be saved as draft?
I'm working on a WordPress site where I want to prevent creating pages or posts with duplicate slugs.
Currently, I have a custom plugin that checks if a slug already exists. If a duplicate is detected ...
2
votes
0
answers
97
views
Gutenberg Selectors API not working or I do not understand it's funcitonality
After spending a few hours getting a custom color palette setup on a block I discovered a guide that mentioned the Supports API. I had somehow missed this feature, the release articles explanation of ...
0
votes
1
answer
192
views
What's the best way to filter/hook into the wp:query block query?
To customize a WP_query I usually use the pre_get_posts filter like so:
add_filter( 'pre_get_posts', 'my_pre_get_posts', 10 );
function my_pre_get_posts( $query ){
// exclude a post id
$...
0
votes
0
answers
31
views
Can not initiate js circle progress in Gutenberg FSE
I have created a custom Gutenberg block via npx @wordpress/create-block called stat-block, I have index.js, edit.js, save.js, view.js and block.json. I believe I have everything setup correctly as all ...
0
votes
0
answers
41
views
Move U.S. to show first in Woocommerce Block Checkout Country Select Field
Using Block Checkout, I am trying to have the United States show up first on WooCommerce checkout country select field.
For that I tried using Make US first in Woocommerce checkout countries select ...
-1
votes
3
answers
661
views
npm start resulting in Wordpress error blocks-manifest.php "no-such-file-or-directory"
-update-
I tried using "npm run build" instead and that worked OK - a workaround, but a pain having to remember running it each time I make a change during testing/development.
I have used ...
0
votes
0
answers
142
views
Update Gutenberg core/image block sizeSlug attribute by deprecation doesn’t change media src HTML
On my website, I want to change the default image size from full to the custom size ‘content_100’. That works fine when I update the default image size in the database (option field). Now I want to "...
2
votes
1
answer
279
views
WordPress: How to enable the border-radius option for the Video block in Gutenberg?
I'm trying to enable the border-radius customization option for the Video block (core/video) in Gutenberg. Despite my attempts to modify the theme.json and functions.php files, the option does not ...
1
vote
1
answer
223
views
How to fetch Options in Gutenberg Editor Edit.js file. There seems no easy way to do this
Fetching Options in a php file in WordPress theme or plugin is as easy as typing:
get_option('option_name');
How do we fetch Options in a Gutenberg block, inside the Edit.js file?
Fetching meta value ...
0
votes
0
answers
46
views
Wordpress Plugin - Implements Blocksy Pattern inside a Block Editor Plugin
I'm working on a new plugin on Wordpress, using the Block Editor model.
My intent is to take the "custom taxonomies" and propose them in a loop structure. What I can't reach to do is use a ...
3
votes
1
answer
235
views
How change the default value of the heading block in Gutenberg
The default heading is H2, but I don ́t have this options, I only have H3 in dropdown
How change the default value of heading, for example change to H3?
I removed the headings from the Gutenberg editor ...
1
vote
1
answer
134
views
Post title ignoring context and patterns not working with provided postId and postType context in render
I've setup a basic block that needs to pass down the context of a post to its innerBlocks similar to how the query block does, so that the title, featured image and excerpt blocks work off that new ...
1
vote
1
answer
134
views
packaging block.json renderTemplate in basic webpack setup using @wordpress scripts
On a Wordpress install, I am using ACF Blocks with "block.json", where my blocks are compiled from a /source directory to a /build directory, where they are registered via register_block_type. I’m ...
1
vote
1
answer
661
views
Adding ACF Block Using block.json - Displaying The Preview Hover Image
ACF support have asked that I render my blocks their preferred way... adding this:
function register_acf_blocks() {
register_block_type(__DIR__ . '/blocks/primary-thin-banner');
}
add_action('init'...