Skip to main content

Unanswered Questions

2,027 questions with no upvoted or accepted answers
4 votes
1 answer
2k views

Add custom buttons with custom actions in Edit Post screen in WordPress?

I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two ...
4 votes
1 answer
2k views

Looking for callback function after Gutenberg is rendered?

On post/page editing screen, I want to call my functions as soon Gutenberg editor/whole page is fully rendered and visible. On WP 5.2.2, I have tried jQuery(document).ready(function () {}); and wp....
4 votes
1 answer
693 views

Display message once per session to users with a specific role

I need to display a message to only users with a specific role. The message should appear either as soon as the user logs in or if they re-open their browser after having closed it when logged in to ...
4 votes
1 answer
2k views

How to use Iris color picker on front-end?

I am trying to use new Iris color picker on the front-end. I succeed in using it on back-end: while using it on theme options I just enqueued the color picker like this … wp_enqueue_script( 'wp-color-...
3 votes
0 answers
74 views

Registering a block in "My Patterns"

I have created a bunch of blocks, and every time I have saved it as a pattern by selecting the block in the list view > three dots > Create pattern. All these patterns appeared in a new category ...
3 votes
0 answers
105 views

Adding block style dependencies

I'm running into a problem where my block styles are being enqueued before my theme style. Because of this, the theme style is overriding my blocks and that is undesirable. Is it possible to add style ...
3 votes
0 answers
193 views

Is there a way to prevent wp_head from outputting self-closing tags?

I'm a beginner in WP development, so maybe I'm missing something obvious. Is there a way to prevent wp_head from outputting self-closing tags? Here are two example lines taken from my website: <...
3 votes
0 answers
695 views

Gutenberg text field validation

I have been searching for ages but can't seem to find an exact method on how to perform text input validation when building custom blocks. I saw that for TextControl inputs you can just pass the ...
3 votes
0 answers
82 views

Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?

Usually, I can replace the template files and PHP codes of any parent classic theme with child themes. Since block-based theme templates rely on HTML, how can I replace parent block-based theme files ...
3 votes
0 answers
1k views

Wordpress Block Theme: Customize meta viewport

I am building a custom Block theme and I need to have this meta viewport in my <head> : <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, ...
3 votes
1 answer
493 views

InnerBlocks restricting does not work on nested blocks

I'm defining which set of blocks to allow in my custom innerblocks: const ALLOWED_BLOCKS = [ 'core/image', 'core/paragraph', 'core/group' ]; ... <InnerBlocks allowedBlocks={ ALLOWED_BLOCKS } />...
3 votes
1 answer
708 views

WordPress Gutenberg Theme: Structure, Hierarchy and Custom Templates

I'm starting to develop a WordPress theme using Gutenberg. I've never worked with Gutenberg before, but since the support for Classic Editor might possibly end next year, I want to use it now since I ...
3 votes
0 answers
110 views

What is "open()" in MediaUpload?

Googling (or searching here) on "open" is hard :) The readme for MediaUpload gives this example: <MediaUpload onSelect={ ( media ) => console.log( 'selected ' + ...
3 votes
0 answers
2k views

Changing order title and featured image in blog post (Astra theme)

The HTML of a post type, I want to swap the position of the title and the thumbnail. I noticed that the title and thumbnail are inside a <header> tag. So I went looking which template file has ...
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?

15 30 50 per page