Unanswered Questions
1,186 questions with no answers
4
votes
0
answers
76
views
Using Primary Color in Plugin Block
I'm developing a Gutenberg block, and I want the block to fit in as nicely as possible with the users site. So I'm trying to include as little styling of my own as possible, eg. allowing buttons to ...
4
votes
0
answers
280
views
Gutenberg Blocks - Attributes from comment delimiter or from HTML?
I wrote a custom block and am trying to better understand the interplay of the JavaScript and PHP on both front and back end regarding blocks.
Say I have some block that I want rendered dynamically. ...
4
votes
0
answers
1k
views
Make alt text required when setting a featured image
In the EU it will shortly be a requirement for public sector websites to have alt text for uploaded images. My organisation's users are rubbish at adding alt text, however, and I'm trying to find a ...
4
votes
0
answers
2k
views
Images dont show in grid view, but do in list view
In media library, images show in list view, but not in grid view. This becomes an issue because adding a featured image is done by grid view only.
I had to edit the DB to make all jpg files lower ...
4
votes
0
answers
334
views
Upload Image Not accessible
I'm getting a 500 error when trying to access the full version of any image. As soon as it's uploaded to the server, it becomes 'unavailable', and each file cannot be accessed/deleted/anything - like ...
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
2k
views
Get all post media images via WP REST API
We want to build a back-end for a mobile app using WordPress. We are trying to get all post images, but when we call https://api.com/wp-json/wp/v2/media?parent=58 we are getting only the first image ...
3
votes
0
answers
162
views
How can I rewrite a plugin generated URL?
I'm using the wpForo plugin to create custom profile pages on the front end of my website.
The profile URLs generated by the wpForo plugin look like this:
example.com/community/profile/username/
...
3
votes
0
answers
2k
views
Attachment page 404 not found when image is attached to post
I have this new WP webiste I’m working on. Today I was going to design the attachment.php page so that my image pages would look nice, but found that I was getting a 404 for all of them actually. I’ve ...
3
votes
0
answers
346
views
Add custom field to category of custom post type
I want to add a custom field (for a icon) to categories of a custom post type.
I use the default category type and not a own create category taxonomy.
How can I add the custom field only to the ...
3
votes
0
answers
231
views
Pulling Post Image Attachments in WordPress 3.9
For some reason the functions I'm using for pulling post images/attachments isn't working after updating to 3.9, has something changed in the way we pull attachments?
The code I'm using in single.php
...
3
votes
0
answers
1k
views
wp_nav_menu custom walker - child items
I have written a custom walker to integrate a jQuery drop-down nav script into my WordPress template. I need to add .dropdown-link to each of my parent menu items and .dropdown-wrapper to the ...
2
votes
0
answers
36
views
I can't see all images in my media library - How Can I reset the index of that library?
When I load my media library (either through the media tab on the left or editing posts/pages and adding images in that interface) it shows that I have 1206 images in my site. However when I click ...
2
votes
0
answers
106
views
Why WordPress convert my webP images into JPG?
ENVIRONMENT: WP Version 6.4.1
When I want to upload a webp image in my woocommerce product, WordPress converts my webP image into JPG.
So I deactivated all the plugins and tried to upload my webP from ...
2
votes
0
answers
130
views
Prevent posts from being published if the 'Uncategorized'-category or no category is selected
I do not want a user to be able to publish a post if no category is selected. This exact solution from a similar question is exactly what i want to do:
jQuery(document).ready(function ($) {
// ...