Unanswered Questions
1,996 questions with no upvoted or accepted answers
7
votes
1
answer
2k
views
Registering menu with 'Automatically add new top-level pages to this menu' selected
Is it possible to register a menu inside of a theme functions file and have 'Automatically add new top-level pages to this menu' pre-selected? I can't find any info about this in the ...
6
votes
2
answers
661
views
Link to Author archive from Navigation Menus in dashboard?
I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have ...
5
votes
0
answers
613
views
How to support Lazy Loading Assets in a WordPress Theme?
I'm using the create-block module provided in Gutenberg Core to build my custom blocks within a plugin. It works great, but I'm struggling to figure out how to conditionally load the assets on the ...
5
votes
3
answers
9k
views
Get category slug and display it on a query_post
I just read "How to create option page for wordpress theme" in wp.tutsplus.com - I have a problem with getting categories .
there is two parts to my question
- Part A - Get category slug and ...
5
votes
1
answer
143
views
Can I create customizer setting that can handle plugin shortcode?
Can I create a customizer setting which will handle a shortcode from a plugin? Do I violate and rules or guidelines in WordPress theme development?
If it's possible what is the best way to sanitize ...
4
votes
2
answers
492
views
Problems with Layout inherit in theme.json
I have in the theme.json of my FSE theme the following lines in the code:
"version": 2,
"settings": {
"layout": {
"contentSize": "840px&...
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
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
707
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 ...