New answers tagged theme-development
0
votes
Why is my Toggle field not showing in Gutenberg?
The issue is that you are conflating registerPlugin with registerBlockType. The render property in registerPlugin doesn't receive any props so both props.attributes and props.setAttributes are not ...
- 3,513
0
votes
Why is my Toggle field not showing in Gutenberg?
You forgot to declare the attributes:
registerPlugin( 'page-layout-plugin', {
icon: 'smiley',
attributes: {
'showSidebarAttribute': {'type': 'boolean', 'default': true}, // <-- and ...
- 121
0
votes
How to get Images included in Post
Please note that post_parent field DOES NOT register an image when it's not being uploaded and added to a post at the same time.
This means that any image that is already loaded to library, will have ...
- 15
0
votes
functions.php doesn't load all custom theme assets
I believe your mistake is using main as handle keyword for both script and style, handle must be unique.
You don't have to use wp_register_script (and style) enqueue function does this automatically. ...
- 713
1
vote
How to fix wp-env: "error: Your local changes to the following files would be overwritten by checkout"
I had the same problem with a completely new installation of wp-env.
In my case, the error apparently originated from wp-env downloading PHPUnit in node_modules/@wordpress/env/lib/download-wp-phpunit....
0
votes
Custom single template for a specific category
OLD SOLUTIONS ARE NOT WORKING FOR THE NEW WORDPRESS TEMPLATES (BLOCK TEMPLATES)?
For those who are coming here from google after 2022:
If you are working with block templates, the new template system ...
- 111
0
votes
Wordpress search field won't get wider
Over on wordpress.org, A user commented that targeting this path:
header form.search-form, header .search input { width: 100%; } might work and it did.
I didn't realize that targeting the form would ...
- 21
2
votes
Accepted
How to set the margin on an innerBlock in a block variation?
If we create a paragraph and give it a margin of 2 ( default settings no custom scales or theme.json ) then we get this:
<!-- wp:paragraph {"style":{"spacing":{"margin"...
- 55.7k
-2
votes
Accepted
Font Awesome Icons as squares
You should be using Font Awesome's provided <link> or <script> tag(s) that they give you with your kit. It should look like this:
<link rel="stylesheet" href="https://kit....
- 128
1
vote
Font Awesome Icons as squares
Your all.min.css font is loaded onto your site, but can you please check you have a webfonts directory with files such as fa-solid-900.woff and fa-solid-900.svg - At the bottom of the all.min.css file ...
- 1,879
1
vote
WordPress PHP8 Critical Error in class-wp-widget.php
The error indicates that the WP_Widget::__construct() function expects at least two arguments to be passed but none were passed in the line of code where the error occurred. This could due to the ...
Top 50 recent answers are included
Related Tags
theme-development × 4429themes × 710
php × 431
plugin-development × 411
functions × 303
customization × 280
plugins × 272
css × 217
custom-post-types × 212
theme-customizer × 207
menus × 195
child-theme × 193
loop × 161
theme-options × 153
templates × 144
images × 124
posts × 114
widgets × 114
wp-query × 110
javascript × 103
jquery × 103
categories × 100
page-template × 89
pages × 88
ajax × 79