Skip to main content

Unanswered Questions

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

WASM page in Wordpress website

I used emscripten to generate some html/js/wasm/data files and would like to add that as a page to my (Wordpress) website. Is this possible? If so, how?
3 votes
0 answers
55 views

WordPress Rest API only returns content when posttype has editor capability

I am trying to request my post via the WordPress V2 Rest API in the backend. For whatever reason the post content is only returned when my custom post type has the editor support enabled. Is there a ...
3 votes
0 answers
386 views

WordPress Customizer Control with React

I am just doing a demo on the WordPress customizer API to edit the header with custom controls. I have designed a custom control by extending WP_Customize_Control and Jquery to refresh/postMessage ...
3 votes
0 answers
118 views

How can I filter block registration based on post-type? (Block alignment settings)

I want to disable the .alignwide and .alignfull block alignment options (remove them from the editor UI) on the 'post' post-type only. I have tried using this block registration filter to modify the '...
3 votes
0 answers
246 views

How to save a ToggleControl value in a meta field?

I registered a boolean meta field called _meta_restrict in a custom post type: PHP: function register_meta_fields() { register_post_meta( 'custom_post_type', '_meta_restrict', array( '...
3 votes
0 answers
397 views

When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?

I am trying to extend the core/image block to add an option for a deferred image. I want to replace the src attribute of the image with an empty string and add the url as a data attribute to be loaded ...
3 votes
0 answers
259 views

Gutenberg - What is the best way to save/update post meta?

What would be the best way in Gutenberg to save/update post meta (not from a block). I can't find an API for it. I was thinking of doing some ajax in componentDidMount using wp.ajax.post Any advice ...
3 votes
3 answers
3k views

Relative path instead of absolute for wp_enqueue_script

When you enqueue scripts or styles with the following: function themeslug_enqueue_style() { wp_enqueue_style( 'core', '/style.css', false ); } add_action( 'wp_enqueue_scripts', '...
3 votes
1 answer
2k views

How to Use JSON With AJAX?

I've defined a PHP callback function to handle the communication between server-side and client-side: function json_render_modal_body() { check_ajax_referer( THEME_PREFIX . '-modals', 'nonce' ); ...
3 votes
1 answer
1k views

preserve url parameters from affliliate sites

Please help, I am using a wp site as medium between e.g. a news site lets call it A and the actual site that e.g. sells a particular product lets call it B. A ---- medium site --- B news site ---- ...
3 votes
2 answers
3k views

Customizer Show/Hide Logo and Site Title

I've setup checkbox controls in my theme Customizer to show/hide the Logo and Site Title when they are checked/unchecked. By default, I want the Logo to display and the Site Title to be hidden. ...
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 ...

15 30 50 per page
1
2
3 4 5
64