Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

media_sideload_image only works on localhost and without return id or src

I'm trying to use media_sideload_image like in this question: Can't upload image using media_sideload_image it works on localhost with add_filter('https_ssl_verify', '__return_false'); for testing ...
ruzip's user avatar
  • 1
0 votes
0 answers
29 views

SFTP File Upload Failure

Starting off, I am very new to coding and servers and typically only edit existing code. Recently, I started a new WordPress site to launch an ecom business and I need to edit some of plugins to ...
Dustin's user avatar
  • 1
0 votes
1 answer
28 views

Two related taxonomies. how to filter terms in second taxonomy depending on selected term in first taxonomy on Post edit page?

I have two custom taxonomies on the site - Countries and Cities. The Country taxonomy contains over 200 terms, and the Cities taxonomy contains over 47,000 terms. Naturally, editing content with ...
Toologic's user avatar
0 votes
0 answers
20 views

PSD File Upload - Media Library not Displaying Thumbnail

I've managed to modify WP so it allows .ai and .psd uploads using the following code: add_filter('upload_mimes', 'custom_upload_mimes'); function custom_upload_mimes ( $existing_mimes = array() ) { ...
Morris's user avatar
  • 103
0 votes
1 answer
29 views

Can't retrieve custom post type taxonomy term to custom post type editor

I have 2 main problems: I can't seem to add editor_name custom field to default/native WordPress list of request URL query parameters. This is the request WordPress is using: http://localhost/wp-...
neke90's user avatar
  • 1
2 votes
1 answer
15 views

Modify upload directory to use post category slug in file path on multisite installation

I am using the default post type and category taxonomy to manage the content on an in-development website that is using WordPress multisite. There are categories defined like "bylaws" and &...
Mike Hermary's user avatar
0 votes
1 answer
24 views

Featured Image add tab

I was wondering if there's a hook/function to add a new tab to the Featured image modal window as shows in the picture below: I've found this thread How to add new tab to media upload manager with ...
mikebrsv's user avatar
  • 101
0 votes
0 answers
28 views

How to save Wordpress post and attachment images from front end using media library?

I'm developing a wordpress page to submit a post and its images attachment. I don't use input type="file" instead use jQuery wordpress media library. frame.on("select", function (...
Samuel Limawan's user avatar
0 votes
0 answers
20 views

wp media uploader and ID3 tags

When I upload audio with wp media uploader using the following code, I can see all this data: wp.media({ library:{ type: 'audio' } }) .on("select", function(){ var ...
Toniq's user avatar
  • 447
-1 votes
1 answer
16 views

Uploading media from non-local host computer

I am working on a Wordpress site that is locally hosted on another computer. I have admin privileges so I should be able to make the changes I need, but I am having trouble uploading new media. I keep ...
Annabelle's user avatar
0 votes
0 answers
35 views

Changing upload directory temporarily

I have various media file uploads that I need to section off into different subdirectories, for example: example.com/assets/Uploads example.com/assets/team They all go under "/assets" but if ...
user1702965's user avatar
0 votes
1 answer
50 views

Get Specific Files (Only Specific Extension Type All Files in Loop ) from Media

I want to get Specific Extension Files from Media of Current Post Uploads—for Instance, .jpg or .png or .pdf, or MP4. (Get Only 1 Extension All Files From Current Post Uploads) Specific Extension ...
Islamic Quran Center's user avatar
0 votes
1 answer
41 views

My custom meta box with textarea field not saved

I created a custom meta box for my custom post type with address, phone, and map but only the map field type textarea not saved. My code here: // Add meta box function vn_store_add_meta_box() { ...
Quốc An Trần's user avatar
0 votes
1 answer
58 views

Cannot add image (png, jpeg, etc.) but can add pdf, 403 forbidden when posting

I just encountered a bug when I am trying to post with images. When I am adding media using "Add Media" button, the image will not add and will have this error: POST https://philsa.gov.ph/...
Nikko's user avatar
  • 101
0 votes
0 answers
28 views

Simplifying 'Add Media' Modal in front-end Content Editor

I am using a front-end submission form for users to contribute posts to my platform. Users can upload text and images via the content area. However, I would like to simplify the interface by limiting ...
RobH's user avatar
  • 7
0 votes
0 answers
57 views

How to Upload a media item with alt text and description

I'm trying to upload a media file to the media library with the altText and caption for it using the media endpoint: https://developer.wordpress.org/rest-api/reference/media/#create-a-media-item ...
Vikram Aruchamy's user avatar
2 votes
1 answer
43 views

Wordpress Playground and uploading permission issue

I've been testing the Wordpress Playground with my plugin. My plugin offers a way to upload a file to wp-content/uploads/ and it seems to work in the playground. $file_name = $file['name']; $temp_file ...
bestprogrammerintheworld's user avatar
0 votes
0 answers
33 views

Trying WP editor to load full size image (not '300x300')

The site used to have a plugin that created a lot of image sizes from uploads (150, 300, 800 px etc). I removed these images from the uploads folder bc they were not used by the theme. Now, the WP ...
Ludo's user avatar
  • 61
0 votes
1 answer
16 views

Custom fields empty after refreshing page

I have added some custom fields to the Gutenberg editor, the purpose is getting these custom fields loaded in the custom-post-type. Thats is all working, I was able to get the custom-fields in the ...
Brango's user avatar
  • 1
1 vote
0 answers
38 views

Removing custom physical folders with rmdir

Need help with WordPress to remove custom physical folders. I am developing a WordPress plugin to use custom physical folders in the Media Library. The functionalty of the 1st version is quite basic: ...
user6786748's user avatar
0 votes
1 answer
34 views

Get all WordPress-created sub folders in uploads directory

I'm writing a maintenance script for my own sites and one part is to clear out all .webp files, since my host now handles WebP conversion on the fly. I could easily traverse through all the sub-...
Gavin's user avatar
  • 414
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 ...
pressword's user avatar
  • 370
1 vote
3 answers
216 views

Front end form with images and media_handle_upload logic?

I'm building a front-end form with image submissions. The form creates then a new post: ...process post... $application_id = wp_insert_post($application); I then use media_handle_upload to upload ...
Runnick's user avatar
  • 1,029
0 votes
0 answers
20 views

custom post type with metabox custom fields

how to make meta custom fields in custom post type name jobs_board_cpt , I am using boilerplate ? public function jobs_board_cpt() { $labels = array( 'name' => ...
Muhammad Ashfaq's user avatar
1 vote
1 answer
46 views

Metabox conditionals depending on post format and template in Gutenberg

In the classic editor, I used jQuery to display metaboxes depending on the current post-format or page template selected. If a user selected a different format or template, they would toggle depending ...
kath's user avatar
  • 621
0 votes
2 answers
955 views

Cannot Upload Video (MP4) File

It's a 28.8 M .mp4 file that has uploaded to another WP installation and is live. I'm trying to use the same file on a development server - a fresh install of WP with a media upload limit of 512M. ...
happycoffeebean's user avatar
0 votes
0 answers
195 views

"Media Library" shows as empty, despite images being present

I am trying to clone a WordPress site, but the files in wp-content/uploads aren't shown in the the Media Library: OK: I have created a new subdomain for a new installation of WordPress, and I have ...
Torben Gundtofte-Bruun's user avatar
3 votes
1 answer
113 views

WordPress Permissions Issue for Media Library / uploading

I've got some issues with file permissions which I'm trying to resolve... I have two sites and they both have the same permissions as far as I can tell but for some reason one site can upload files / ...
Ryflex's user avatar
  • 83
0 votes
0 answers
16 views

Upload media file failed. Uploadtest failed

When i want to upload a media file in wordpress (dashbord media) i get the message: Uploading “” failed. The file failed the upload test. php version: 8.0.30 Is there a string/variable that must be ...
Albert Lepoudre's user avatar
0 votes
1 answer
128 views

Can not access .txt file which I uploaded through media

I can not access my uploaded .txt in Wordpress, it gives a 403 access denied error. I can access .png files however, why not .txt files? I uploaded my file here: And got the URL here (I click copy, ...
NoKey's user avatar
  • 101
0 votes
0 answers
30 views

Do uploaded files to /tmp/ get deleted in WordPress automatically?

I create a custom plugin with a upload file input in the admin area, my concern is, what happens to the file after upload? My concern is that the file that is going to be uploaded has sensitive ...
drshelloworld's user avatar
1 vote
1 answer
207 views

Moving uploads directory above wordpress directory. UPLOADS location in parent directory

I will ask for help as I'm going nuts trying to figure out what is going on here. I've read many other questions but there is never a final answer. I want to organize my WP installation in a different ...
Gerard Reches's user avatar
0 votes
0 answers
22 views

upload featured image using custom post type

I keep getting this error on specific posts that is created using custom post type. the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is ...
winona's user avatar
  • 131
0 votes
0 answers
37 views

I have uploaded thousands of files in the uploads folder via FTP and I want to register them into the database without any plugin

I have uploaded thousands of files in the uploads folder via FTP and I want to register them into the database without any plugin because plugin takes so much time. Is there any way to register them ...
Sheikh's user avatar
  • 1
1 vote
0 answers
22 views

How to revert the media structure from /uploads/year/month to the /uploads directory in wordpress?

I tried to use wp-cli using regex like this: wp search-replace 'uploads/[0-9]+/[0-9]+/' 'uploads/' --all-tables --regex but in this case there is a problem with possibly repeated file names and ...
Macsurf's user avatar
  • 11
1 vote
1 answer
454 views

Convert base64 string to WordPress attachment uploads multiple images instead of a single one

I'm trying to convert a base64 string to an image file and upload it into WordPress media library. It seems like the code is working, but, for some reason, every time I call this function it uploads ...
benjah's user avatar
  • 111
0 votes
1 answer
89 views

stop resize button for wordpress media

The images in my WooCommerce product gallery do not need to be resized I only need the original image to display. Is there a way to add a toggle button to wordpress media to tell it to generate other ...
Monoor's user avatar
  • 13
0 votes
0 answers
62 views

Enabling custom file and mime types in multisite

I want my multisite network to be able to upload and distribute files that are not allowed by default. In multisite network settings there is a field for adding additional file formats. However this ...
tanGIS's user avatar
  • 101
0 votes
1 answer
37 views

Second featured image only shows in metabox preview after saving a post in the wordpress editor

I am trying to add a second featured image to the Wordpress post editor, and it seems all be working. When I select and image from the mediauploader the first time the image shows in the preview of ...
Brango's user avatar
  • 1
1 vote
1 answer
102 views

Different upload file size limits based on file type

I would like to put a different limitation on uploading content in the media library ( depending on file size and file type) For example : Upload mp4 (allow maximum upload file size 64mo) Upload pdf (...
Samuel's user avatar
  • 354
0 votes
0 answers
80 views

How to change media folder from created time of the post to publish date?

Now, all the structure of the media folder is under /wp-content/uploads/ and years-months combination from the created date of the post. Is it possible that his path will automatically change to /wp-...
Victor Ramos's user avatar
1 vote
1 answer
29 views

wp-content/uploads/year/month returns 404

I have a litespeed hosting I have disabled all plugins and all wordpress related htaccess rewrites. If I go to https://digitalzoomstudio.net/wp-content/uploads/2023/ - then I can see the directory ...
digitalzoomstudio's user avatar
0 votes
1 answer
28 views

WordPress Media File - Hard Code

On our website, we have a downloadable PDF guide. I know I need to upload a PDF to the media library and copy the media file URL, but under what section would I find the hard-coded area to make the ...
Simone's user avatar
  • 1
0 votes
1 answer
363 views

Is there a way to bulk upload HTML files into WordPress as posts or pages?

I realize this is a longshot... I have a site running on a proprietary platform ("SiteSell", aka "SBI"). I have over 200 html files from that system on my local computer. Is there ...
Bob's user avatar
  • 1
0 votes
0 answers
30 views

coauthors_plus_edit_authors to display metabox based on author caps

Need to display the coauthorplus metabox with author capabilities. On the documentation of the plugin they say its only with super admin and editor that the metabox is available. Any idea to add a ...
made leod's user avatar
0 votes
0 answers
41 views

Images stored from external API not loading

The following is my code I am using to store image that I am getting from an external API using my own plugin. The images, or any media in general, are not loading on the frontend or the Media tab on ...
I. Antonov's user avatar
0 votes
0 answers
31 views

Can't save Image from external API into Database

I am trying to create a plugin that gets data from an external API and stores the data into the database. The data I am receiving, contains Texts and Images. I have to save them separately as in the ...
I. Antonov's user avatar
0 votes
1 answer
23 views

css and images in uploaddir, different response in different browsers

I have some pages to demonstrate how to include and use some code. Therefore I load js, css and images with sftp to a directory in /wp-content/uploads/ and describe how to use it. Now I would like to ...
pehu's user avatar
  • 11
0 votes
1 answer
77 views

Does Wordpress Super User or Administrators can create and edit post and media on behalf of a user

For my project I need to administrate user post and media without access to it personal account. So I must be able to create and edit a post (by is user name) before or after it has been created on ...
imagIne's user avatar
  • 105
0 votes
0 answers
39 views

remove links in pop-up media gallery

Is it possible to remove certain links in the pop-up media upload screen? Is there a filter for the output of those links? We need to remove the links crossed out in this screenshot: We can hide them ...
shanebp's user avatar
  • 5,083

1
2 3 4 5
73