All Questions
3,622 questions
3
votes
1
answer
794
views
How do I display a PDF thumbnail as a link to the PDF without uploading the image
When I found a couple of years ago that WordPress will create thumbnails of uploaded PDFs, I was so happy, thinking I wouldn't have to make and upload separate PDF cover images to have a thumbnail ...
0
votes
0
answers
99
views
Permission to edit media files (photo captions, alt tags)
What permission is required for a user to be able to edit all media files in Wordpress?
I'm trying to edit the captions and alt tags of some media files in Wordpress. I can see the media file in the &...
0
votes
0
answers
67
views
How to modify the uploads directory for wp.media.frame assigning an subfolder name
To be better organized I must be able to manage the media independently of the user.
So in addition to restrict user to see only these files(images, docs, videos), I need to insert media for each ...
0
votes
1
answer
174
views
Xhr.send : PDF upload failed with status 400 and response 0
Hope you are doing good.
I need your help if you may, please.
I have a js code that actually generate a pdf client side and should supposely upload it on the wordpress server. It's not the first time ...
0
votes
1
answer
89
views
doesn't save custom meta box data wordpress
My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code:
<?php
// Function to add a metabox
function ...
0
votes
0
answers
33
views
Multimedia upload error in my wordpress job board plugin
I have the below code in my plugin. Admin is meant to be able to insert funding_amount, funding_deadline, and funding_multimedia_field from the dashboard if the resource category chosen is funding. ...
0
votes
0
answers
55
views
Custom uploader - Upload files and save link into database
I'm working on a file manager plugin. I need to store the saved files in custom folders and save the link into database to be able to get all the files and folders structure inside my vue front-end. ...
0
votes
1
answer
81
views
Only display top level taxonomy on the edit post page with option to expand sub-categories
We have a custom taxonomy that is hierarchical. It has so many sub-categories that to scroll through them in the edit post page is proving problematic for editors.
Is there a way to initially show ...
0
votes
1
answer
630
views
Get a list of folders inside uploads directory
I know I can create a folder in uploads directory using wp_mkdir_p() function of WordPress. I'm working on a file manager that will use the rest api to get a list of files since it's vue based for the ...
1
vote
1
answer
196
views
Using add_meta_box on a page with file upload and importing fields
This must be fairly simple :) I'm trying to import data into ACF repeater fields and am mostly following the answer to Add special meta box to custom post type
But what I have below isn't saving the ...
1
vote
1
answer
117
views
How can I get all attachments by a user on a WP multisite network?
I'm creating a front-end based project where users can make posts and add images to them. It's a network of sites that users have access to.
For a better user experience, I want users to be able to ...
0
votes
1
answer
52
views
How can we upload custom page files?
By making our own .html, .css and .js pages, how can we upload them in WordPress directory correctly? And then, how can we insert, for example, our Elementor's header (which is being used in all ...
0
votes
1
answer
174
views
Wordpress Media Uploader not displaying image that has just been uploaded
I am trying to implement a custom WP Media uploader within a plugin. I want multiple images to be uploaded also.
I have the following javascript to open the media uploader. The modal opens fine and ...
1
vote
0
answers
57
views
Problem with "is_user_logged_in()" and woocommerce (Code for custom media upload for each author.)
I'm sorry for my english...
I am using the following code to create separate media directories for each author..
( Thanks to https://wordpress.stackexchange.com/a/400352/220907 )
function ...
0
votes
1
answer
715
views
How allow only the uploading user access to media
I have an application that requires that only the user + admin can access files uploaded by that user?
EG a user uploads an image to media. Only that user should have access to it
Thanks for any tips
...
0
votes
1
answer
30
views
Media manager asks for file title when upload
When I upload a new file I have this error message : Content, title, and excerpt are empty.
I found the error messahe in wordpress_data/wp-content/languages/en_GB.po line 6809 (but it's a post related ...
0
votes
1
answer
168
views
Restricting Image Upload Sizes using 'wp_handle_upload_prefilter' - Stuck media progress bar when Featured Image?
I have grabbed this function and adjusted it to my needs.
add_filter( 'wp_handle_upload_prefilter', 'check_image_dimensions_during_upload' );
function check_image_dimensions_during_upload( $file ){
...
0
votes
2
answers
45
views
I can't increase the max upload file size for wordpress on local install?
I am running a local dev installation of Wordpress. I try to upload a 32MB video but I can't increase the upload file size past 8M.
My php.ini is set to 200M
upload_max_filesize = 200M
I have ...
0
votes
1
answer
20
views
Saving custom input from settings sidebar of pages in Wordpress
I created a meta-box with an input field in the settings sidebar of pages. Now I try to save the value, but it does not work. Maybe the problem is, that I try to do this with pages and not with posts. ...
0
votes
2
answers
41
views
WordPress is getting 404 with non-English filenames
I have an old WordPress site. The site is now running on WP 6.2.2 with the TwentyFifteen theme. PHP version is 8.1.20 with no major Alert in WP Health page.
If you open the file on a new tab, it's ...
0
votes
1
answer
110
views
All uploaded files using wp_mail() renamed to tmp_name
I am attempting to retain the original file name of my uploaded file using wp_handle_upload() and wp_mail().
Currently, all files are retaining their original file extension, but renaming themselves &...
2
votes
1
answer
160
views
wp.media multiple selection limit
When I use wp.media dialog , is there a way to limit how many files can be selected when multiple option is used?
wp.media({
library:{
type: "audio"
},
...
0
votes
1
answer
203
views
How to solve too many files in uploads folder(s)?
my wordpress has this setting for upload - .../uploads/{year}/{month}
However I noticed that some folders (like .../uploads/2023/06) have 30+ thousands files.
So I want to relocate them to new ...
0
votes
1
answer
192
views
How to change the text of Publish Button
I am trying to change the text of the publish button to save.
I could change the text.
BUT, When I click Status Edit button and OK button, it change "Publish".
How can I fix this?
This is ...
0
votes
0
answers
516
views
How to disable the PDF preview in the file block by default
when I insert a PDF file with the file block on the page it always opens to me with the preview of the file with the pdf viewer, so I have to put the check to disable it. Is there a way to have that ...
0
votes
1
answer
342
views
How can I find a big uploaded zip file in the Media library?
I need to upload big files 500 MG and more to my wordpress site so that these can be used as downloadable products on woocommerce plugin. I managed to connect my site to Fillzilla found the folder ...
0
votes
1
answer
302
views
How can I put a checkbox in the post editor
Up to now I'v been able to insert text custom fields and number custome fields in my post editor page, now I need to insert a checkbox, as a new meta field. I write here the code I have for a number ...
0
votes
1
answer
42
views
I want to allow certain file types on dokan upload files
Before we get started, I have tried alloweding "UPLOAD_UNFILTERED_FILES" thing on config.php and i have tried allow different mime type plugins, none of them worked
I want to allow .rbxlx, ....
0
votes
1
answer
1k
views
"Unexpected response from server" error when trying to upload any .mp4 file over 100MB
This WordPress site is being hosted by BlueHost (with cPanel). It is running on WP version: 6.2.2, and PHP Version ea-php74.
According the the WP's media 'add new' page, the Maximum upload file size ...
0
votes
1
answer
37
views
Add URL in image upload error message
I'm wanting to add a URL link into the image upload error message, but it's only printing the string, not adding the hyperlink. I'm using the code below
function my_max_image_size( $file ) {
$...
0
votes
0
answers
48
views
get_post_meta returns on side but it doesn't return on bottom of admin page
I have added a custom image upload option in custom CPT page and here is the screenshot -
The image is showing well in side bar of admin page after updating a post, screenshot-
But when I add that ...
0
votes
2
answers
1k
views
Update media item using wordpress rest api in python
I am trying to update an image using the Wordpress rest api in Python. I get the status code 200 but the image does not update. I have not found any solution online other than replacing http with ...
0
votes
0
answers
18
views
How to restrict product access to personal user uploads in WordPress
By default, WordPress allows authors to see all products on all products on your site. If you invite a large number of guest writers, this can be problematic. How to restrict access to all WordPress ...
0
votes
0
answers
222
views
How to consume external API from WordPress post editor and display the response data in the custom field?
I am developing a custom post type called "Team," where I will add some profiles of team members. I am using ACF for the custom field to add personal details of the members (I can also ...
0
votes
1
answer
143
views
how making a selection from a taxonomy selector fixed definitively
I have created a taxonomy “Ospiti” (guests) and set a selector in order to write the number of guests. If I select the number “7” and then edit the post , I see in the posts admin colum the n “7” ...
4
votes
1
answer
191
views
How can I add custom sizes for PDF thumbnails generation?
I define custom image sizes in my theme like this :
add_action( 'after_setup_theme', 'mwm_custom_image_sizes' );
function mwm_custom_image_sizes() {
add_theme_support( 'post-thumbnails' );
...
0
votes
1
answer
707
views
Uploading media to wordpress API with C# HttpClient
I was trying to save some media but I can't get it to work. I don't know if its the authorization is the wrong format, or if its the content is just put in wrong. If someone knows how to please help ...
0
votes
2
answers
228
views
Is there a way to remove the Add boxes from the Screen Options menu metabox?
I'm removing the default metaboxes like so:
function rh_remove_dashboard_widgets(){
remove_meta_box('dashboard_activity', 'dashboard', 'normal');
remove_meta_box('dashboard_right_now', '...
1
vote
0
answers
38
views
Post meta box data not saving
The meta box, fields, etc. are all displaying correctly but when I go to update the page it seems the data in those boxes has not saved. Any ideas? Using a custom post type called 'question'. Would be ...
0
votes
1
answer
63
views
Saving metabox updates causing fatal error
I'm teaching myself from a plugin tutorial dvd, everything was going fine.
I've setup custom_post_types and the metaboxes with no issues. The issue i have is a fatal error when i update/publish the ...
0
votes
1
answer
292
views
Does WordPress import export tool keeps the file hosted on the old website?
I have an old website with several GBs of media data. i want to export the media files with wordpress export / import tool to my new website. Wordpress gives me a 10mb .xml file out of the several GBs ...
0
votes
1
answer
198
views
Modify Term List in Custom Taxonomy Meta Box
For the life of me, I can't find the hook for altering the list of terms in a custom taxonomy metabox.
On the post-edit screen, instead of list of custom taxonomy terms like this...
[ ] Bob Dylan
[ ] ...
1
vote
3
answers
3k
views
Can't upload svg files in WordPress
I am facing the following issue while uploading any SVG file and sometimes face the same issue while uploading any image. "The server cannot process the image. This can happen if the server is ...
0
votes
1
answer
649
views
What is the proper use of guid for images in wp_posts?
I understand that guid is a unique reference for a post, whether that post is a post or an attachment.
When it's a post, I think guid is self-evident. But what is the correct formulation/destination ...
0
votes
2
answers
785
views
fails upload images in posts + wp-admin/upload.php 403 error
I have a problem with WordPress 6.1.1, I can't upload images in posts. The error message says 'The server cannot process the image. This can happen if the server is busy or does not have enough ...
0
votes
1
answer
167
views
Assign multiple categories to Media Library upload
I want to be able to upload files and either immediately or after upload assign multiple categories to them. I have 3 different kinds of PDF document: Treasurer report, minutes, and newsletter. What I ...
1
vote
0
answers
55
views
upload image to wordpress media library failed for custom post type
image upload failed. I tried to upload gym logo as thumbnail image for gym post type. All the form elements are working. But image upload is not working. images are not appearing in WordPress media ...
0
votes
0
answers
325
views
How to properly move media files and update data?
Bashing my head against a wall here.
I want to write a function that moves the actual file of a Media Library attachment, but this must necessarily update all metadata.
I am already doing a foreach on ...
0
votes
1
answer
222
views
How To Convert External Image URLs To Own Website's Uploaded Images Automatically?
I have a website with over 300 posts and initially I used to use external image URLs in my blogs instead of uploading it to my DB and using them.
Is there any way to automatically get all the external ...
0
votes
1
answer
447
views
I want to Display custom woocomerce meta box in orders list
I run a WooCommerce store and work with lots of delivery companies. To keep things organized, I added a custom post type where I can add new delivery companies. The meta box in the order details shows ...