Skip to main content

Unanswered Questions

959 questions with no upvoted or accepted answers
3 votes
0 answers
1k views

How to overwrite JS variable with wp_localize _script?

The function wp_localize_script( $handle, $name, $data ); does not work when trying to overwrite the same variable, that is when calling the function second time with the same $handle and $name but ...
3 votes
0 answers
316 views

Theme Customiser not live previewing changes on pseudo elements

I've been working with the Theme Customiser API lately and found that pseudo elements are not live updating using the previewer. In my project I have an image containing a transparent overlay using ...
3 votes
2 answers
2k views

Draggable item in custom gutenberg block

I'm developing some custom blocks in the new Gutenberg editor experience, and I'm struggle to understand how to use some build-in components, mostly the Draggable components. What I would like to ...
2 votes
0 answers
80 views

How to Use Webpack with WordPress Script Modules and Enqueue a Custom Class

I am working on a WordPress project using version 6.5, which introduced support for JavaScript modules. I have a parent theme that exports a JavaScript class, and I want to import this class in a ...
2 votes
0 answers
43 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....
2 votes
0 answers
63 views

Can't find elemnts on the DOM using Custom Control in Customizer API

I'am creating a Custom Control on Customizer API, I add Multiple Checkbox as my custom type. When I wanna add a live preview, the jQuery doesn't find the selector that I want. Here's functions.php ...
2 votes
0 answers
400 views

Gutenberg move post/page title to Editor sidebar document panel

I have not liked the way that the post/page title in Wordpress 6 / Gutenberg is contained directly in the block editor. I have found many ways to remove it with filters and / or restyle it but ...
2 votes
0 answers
48 views

configure additonal build files in the @wordpress/create-block

I'm using the @wordpress/create-block package to create my block plugin. It comes with preconfigured webpack settings to build all the assets. By default as js in the src/ folder is built in the build/...
2 votes
0 answers
78 views

Is there any halfway decent documentation on the wp.media JS class?

Sorry for the somewhat rambly question, but has anyone ever seen any good piece of documentation, or maybe even a tutorial on the wp.media JS class? All that i could find documentation-wise is this ...
2 votes
0 answers
158 views

How to add more elements to an already existing <PanelBody> section in Gutenberg

I am filtering core blocks to add more functionality and I know how I can create a new section in the sidebar that is opened by default like this: return ( <> ...
2 votes
0 answers
130 views

Prevent posts from being published if the 'Uncategorized'-category or no category is selected

I do not want a user to be able to publish a post if no category is selected. This exact solution from a similar question is exactly what i want to do: jQuery(document).ready(function ($) { // ...
2 votes
0 answers
597 views

Wordpress Gutenberg: Attribute overwritten by block duplicate

For a custom wordpress gutenberg block I've created a list of buttons so that users can add/remove as many as needed. While this works pretty fine one issue occurs: When duplicating a block the ...
2 votes
0 answers
608 views

Get Required Assets (JS, CSS etc) for post using REST API

I'm using the REST API to access WordPress data and publish it on a custom frontend as part of an integration. This works great because the shortcodes are parsed and rendered by WordPress so the ...
2 votes
0 answers
292 views

Passing RichText attributes to function onChange

I have four RichText elements in a custom Gutenberg block I am developing, and they are all very similar except for the "name" attribute, which is currently hard-coded. What I need to do is ...
2 votes
0 answers
346 views

Including dependencies using @wordpress/dependency-extraction-webpack-plugin

I would like to add include additional script handles to the dependencies in assets.php using @wordpress/dependency-extraction-webpack-plugin. An example for this would be a script that extends ...

15 30 50 per page
1 2
3
4 5
64