Unanswered Questions
1,140 questions with no upvoted or accepted answers
3
votes
0
answers
283
views
Dynamically add styles to WP TinyMCE editor
I want to add custom styles to Wordpress using dynamic arrays.
My question is how can I add the two arrays to the style_formats array within the 'my_mce_before_init_insert_formats' function ...
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
1k
views
Setting TinyMCE Content in wp_editor
I am currently coding on front-end editing in wordpress. The outcome should be evernote-like editing using wordpress posts.
The Wordpress database stores markup without paragraphs and adds them on ...
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
94
views
Tinymce shortcodes within shortcode contents
I am using wp.mce.views.register to create a simple view for my shortcode in the tinymce editor,
this works fine but i am looking for a way to have "nested" shortcodes
e.g.
[column_3]
[info_box]
...
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
0
answers
710
views
Visual Editor freezing on text highlight since 4.3
Ever since I updated my website to 4.3 my visual editor is freezing every time I try to highlight a piece of text, or even place my cursor someplace random. This only seems to be happening on the text ...
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
1
answer
182
views
How to add placeholder in wp_editor?
i would like to add placeholder when using wp_editor() function.
I tried to pass placeholder attribute in textarea, but didn't work. I tried to pass it in settings
wp_editor(
$...
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 ...