Skip to main content

Unanswered Questions

1,279 questions with no upvoted or accepted answers
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
2 answers
2k views

How to set the background color of a template part (Header/Footer) in Twenty Twentythree?

In Wordpress's shiny new Twenty Twentythree theme, how can you assign a background color to the header or foother template parts? Can this be done in a child theme - through theme.json? Or somehow ...
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
1k views

Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin

I have a code I always used in my themes or child-themes. I'm doing right now a project with plugin-only as a solution, so I tried to copy paste some stuff from child-theme to plugin file, but I get ...
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 ...
2 votes
0 answers
779 views

Nonces, AJAX, script variables & security in WordPress

Alright, so let's say you develop a website where you enqueue a js script on a page X of your frontend, using: wp_enqueue_script( 'script_handle', PATH_TO_SCRIPT, array(), '1.0.0', true ); ...
2 votes
0 answers
266 views

Override Plugin Script Fucnction in Wordpress

I don't know how to remove a specific function from a plugin. My plugin is Photo-gallery. I want to remove this function: function spider_createpopup(url, current_view, width, height, duration, ...
2 votes
1 answer
2k views

Uncaught TypeError: Cannot read property 'firstChild' of null after upgrading to WordPress 5.5

I am getting the following error from comment-reply.min.js (which seems to be a WordPress file): Uncaught TypeError: Cannot read property 'firstChild' of null at comment-reply.min.js?ver=...
2 votes
0 answers
872 views

What is the correct way to import the blocks-editor?

I was following a blocks tutorial that was using @wordpress/editor to import some components and everything was working correctly but I was getting tons of deprecation warnings in the browser all ...
2 votes
1 answer
97 views

How do I store information in a dynamic block in WordPress?

I am trying to develop a dynamic block plugin where I store up to 7 links using Gutenberg and so far here is part of my code: edit: props => { const { attributes: { links = [], ...
2 votes
0 answers
260 views

How to handle Gutenberg wp.data async errors?

When using wp.data.select('core').getEntityRecords(...), there is a special selector for loading states wp.data.select('core/data').isResolving(...). But what about actual errors -- backend validation ...

15 30 50 per page
1 2 3
4
5
86