Unanswered Questions
3,818 questions with no upvoted or accepted answers
5
votes
0
answers
614
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
0
answers
208
views
Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?
I inherited a couple of WP + WooCommerce shops with roughly 30,000 products for sale each, and a wp_postmeta which is over a million lines. The former webmasters ran away.
In an effort to clean up old ...
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
1k
views
Custom taxonomy on permalink
I have a long time problem and look forward for your help.
I have a custom taxonomy of "city" (it is no hierarchical like tags).
I just would like my URLs to look like this:
/%city%/%category%/%...
4
votes
0
answers
2k
views
get_permalink returns default link
I hope you can help me.
So I'm using /%postname%/ as permalink structure, and my htaccess looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /develop/...
4
votes
0
answers
194
views
permalinks with get variables
I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows
add_filter( 'query_vars','driver_vars' );
function driver_vars( $vars ) {
...
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 ...