Unanswered Questions
1,479 questions with no upvoted or accepted answers
3
votes
0
answers
47
views
Script won't execute in the media manager
I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded ...
3
votes
0
answers
629
views
Making a custom widget that includes a tinymce and works in Site Origin Page Builder
For a client I'm using Site Origins Page Builder plugin. It enables the client to make rich layouts for each page by dragging and dropping widgets. Site Origin widgets that require a WYSIWYG-editor ...
3
votes
0
answers
191
views
How to create a repeatable / reusable divs in the metabox?
I have a meta box:
<?php
function custom_meta_box_markup() {
global $post;
$meta_box_text = get_post_meta( $post->ID, 'meta-box-text', true );
$meta_box_text_day = get_post_meta( $...
3
votes
1
answer
1k
views
How to disable drag-and-drop upload function in Media Library?
Does any one knows a valid/standard way to disable drag and upload when accessing the media library in the admin area? In order to make this sense to you, I'm building a multisite and user of sub-site ...
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 ($) {
// ...