Skip to main content

All Questions

Tagged with or
1,114 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
377 views

Using wp_enqueue_media() with switch_to_blog() issue

I'm using WordPress media upload through wp_enqueue_media(); to upload media. It works perfect. But, I'm using multisite. Media upload is available on all sub domains. If someone upload image from ...
maheshwaghmare's user avatar
1 vote
5 answers
47 views

Uploading website to Host

My website is currently on localhost but painfully slow. I am going to upload it to 000webhost.com who offer a free hosting service. I am keen to see if this speeds things up. I was wondering if ...
PaulMcF87's user avatar
  • 131
1 vote
0 answers
18 views

Can't manipulate media uploads

I'm trying to change the title of the uploaded image. But nothing is working, I placed this code in my plugin file: add_filter('sanitize_file_name', 'filter_function_name_11', 10, 2); function ...
RiesvGeffen's user avatar
1 vote
0 answers
39 views

Prevent small image sizes from being uploaded

In a custom meta form, I have a place where the images that should be uploaded should be bigger than 1000px x 500px to show up well on the site. This page can be edited by my client clients, so we ...
Fredy31's user avatar
  • 878
1 vote
0 answers
418 views

Get updated meta value after post update or published (custom post type) using hook

function corp_210517_save_post($post_id, $post, $update) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return $post_id; } if( wp_is_post_revision( $post_id ) ) { ...
Rituparna sonowal's user avatar
1 vote
2 answers
519 views

Upload Button in meta box not opening library

First, thank you for your help. I have created a custom template, added two metaboxes in Pages using a 'Page_Fiche_Metier.php' template. One meta box is to upload an image. But the Upload Button is ...
Sonia's user avatar
  • 11
1 vote
0 answers
140 views

How to add upload video option in wordpress for user?

I have a website developed on WordPress.The website is basically job portal. Here in my website two types of user candidate and employer. In my website there is one signup form for both candidate and ...
Nitish Paswan's user avatar
1 vote
0 answers
209 views

Store multiple textarea data in database from a metabox

I am building Metabox in WordPress, and I have added two TextArea with JSON Data . but When I Click on Save button than only first textarea data can be stored in database insted of both textarea. <...
Vishal Chodvadiya's user avatar
1 vote
1 answer
861 views

Adding metabox to wordpress plugins menu page

Now I am building a wordpress plugin. I need to add a metabox to the admin submenu page. I tried like this below, add_action( 'add_meta_boxes', 'add_meta_boxs'); function add_meta_boxs() { ...
Preethi's user avatar
  • 13
1 vote
0 answers
656 views

Repeatable Fields Metabox with Textarea (or wp_editor)

I have a metabox that is using repeatable fields, however I need to re-use the repeatable fields in a more user-friendly fashion than simply by showing an input bar. Ideally I would like to be able ...
Trenton Moore's user avatar
1 vote
0 answers
164 views

Alternative or workaround for wp_insert_attachment

I am creating a woocommerce product programmatically. Sadly, these products sometimes has about 8-12 variations with attributes. I also want to attach an image to these variations and as far as I ...
Donatas's user avatar
  • 93
1 vote
0 answers
127 views

Wordpress media upload automatic refresh

I have added rotate image functionality in WP media upload. Image is rotating fine and saving is also fine, but when media upload popup is closed and opened again, it shows rotated image to previous ...
Kevin S's user avatar
  • 11
1 vote
2 answers
2k views

What is the alternative to `<?php the_content(); ?>` when it comes to calling Media (image) files in the 'attachment.php' file?

I am in the process of putting together my own WordPress Theme. Up until now, I have been using the 'single.php' file to act as a Template for both my Blogs and Media Files. In reference to my Media ...
Craig's user avatar
  • 358
1 vote
1 answer
566 views

How to destroy or dispose wordpress uploder/manager?

Can someone help me, I want to destroy my previous media uploder frame and remove all elements they have created to change the media file type but I cant do that, In last of my search, I have found in ...
Manyang's user avatar
  • 107
1 vote
0 answers
393 views

Duplicates and other problems in Media Library

Maybe anybody will be able to help me with this strange problem. Situation – We have a site with a lot of blog posts (since 2010). They are important for us. As a result, we have a lot of images. ...
OlafKS's user avatar
  • 11
1 vote
0 answers
69 views

Custom Attachment Caption Fields

I am looking to create a new field group in the gallery Attachment Details section. The field group would be called Project Tiles would contain the following fields: Caption Link (ideally this would ...
user2798841's user avatar
1 vote
1 answer
1k views

upload_mimes not accepting CSV

Hi I am adding support for CSV uploads like so : add_filter( 'upload_mimes', function ( $mime_types ) { $mime_types['csv'] = 'text/csv'; return $mime_types; }); How every when I try to ...
frank astin's user avatar
1 vote
1 answer
225 views

Show preview of post changes on page

I've got a pretty unusual feature request or just don't know how to phrase it, since I couldn't find anybody else trying to do this. In the editor of the front page I've added a custom meta box to ...
taymless's user avatar
  • 123
1 vote
0 answers
2k views

Add Metabox to settings / options page

I am looking to add a metabox to an options page I have created using ACF. I have tried just about everything without success. I have created many metaboxes with custom post types but never with an ...
James's user avatar
  • 205
1 vote
1 answer
114 views

Create Connection Between two post types

I am creating a custom calendar plugin but I am stumped with the connection of post types. I have a 2 post types "Calendars" and "Events". I would like to create a metabox that contains a table just ...
James's user avatar
  • 205
1 vote
0 answers
376 views

How to submit data between wp_iframe and backbone.js in media upload

In short: On a post/page edit.php I want to be able to click Add media and open the default media uploader instead of Create Gallery on the left-side menu there is a custom tab. on this custom ...
Bardock's user avatar
  • 11
1 vote
1 answer
349 views

"send_to_editor" function returning pdf file name

I'm using the Media Uploader to select a file url for a custom post type. I'm expecting the html parameter for send_to_editor to be a string html tag that includes the file url as the src or href. ...
Dustin's user avatar
  • 11
1 vote
0 answers
619 views

Edit woocommerce product post type

How can I add a metabox to woocommerce product post type from an existing plugin? The plugin author says its not currently supported, but it's a feature I need. I've tried different things to no ...
Kozz's user avatar
  • 11
1 vote
0 answers
119 views

pre_get_posts for custom page builder meta box

I created a page builder meta box. When I click in the sample button, that creates a block of posts layout (which has some Options like Max Numbers of posts to show) I need to add custom Max Numbers ...
ShahePars's user avatar
1 vote
0 answers
173 views

Disable closing on metaboxes

I'm trying to force a metabox open and not let the admin close it for a custom post type, is this possible? See below for the code that creates the box. function cwf_create_enquiry_metabox_html() //...
Self Designs's user avatar
1 vote
0 answers
2k views

Show image crop window on image upload

I'm trying to add image from front end and crop it after upload. Used setState( 'cropper' ); to enable image crop window. It open the image upload window. Upload an image. But, Not open Image Crop ...
maheshwaghmare's user avatar
1 vote
0 answers
73 views

Disable image thumbnails for only one upload folder

I have a form that is uploading resumé files into a custom folder at /wp-content/uploads/resumes. While I do want thumbnail sizes generated for the regular folders, I DO NOT want sizes generated for ...
George's user avatar
  • 11
1 vote
0 answers
49 views

making media URL secured

I am working on a project in which all the media files should be secured and can be only visible to logged in users. Stop Sharing Media using Absolute URL If one people copy the media url and paste ...
Aftab's user avatar
  • 1,391
1 vote
0 answers
1k views

How to add select list to meta box field?

I have created custom meta box field product_statuss to my CPT product. I want to predefine four possible statuses and display them as dropdown list but have spent 4+ hour running the same error. Here ...
Kārlis Janisels's user avatar
1 vote
1 answer
45 views

How to upload a file from WP directory automatically?

I would like to upload a CSV file from local ftp to WP directory and import this CSV file from WP directory to mysql database automatically? It is possible?
user103182's user avatar
1 vote
0 answers
633 views

NGINX rewrite rules for multisite

I have a WordPress 4.6 network running on an Ubuntu 16.04 server with NGINX. I have one main site and then I migrated a single site installation to a subsite under that main site. I made all the DB ...
William's user avatar
  • 11
1 vote
0 answers
115 views

Controlling Meta Box Height

I tried to add elements to metaboxes and I am having a problem with the height. Here is an example of "good" scenario of adding a textbox and a checkbox - the height is coordinates automatically to ...
I. Sher's user avatar
  • 11
1 vote
0 answers
213 views

How to get the return value of wp.media({ frame: 'post' }) in all cases?

When the user is in an edit.php page or post-new.php, the wp.media global is available and I want to use it to open a special insertion view that allows videos. var frame = wp.media({ frame: '...
Alain Jacomet Forte's user avatar
1 vote
0 answers
229 views

Wordpress Media frame pre load images from ids

Im using custom metabox button to create wp media frame with this code, var frame, selection, idsField = $('#_fills_ids'); frame = wp.media({ title: 'Select or Upload Media Of ...
Wimal Weerawansa's user avatar
1 vote
2 answers
4k views

Using $_FILES variable into the same function for uploading images and files

I want start saying that I'm learning and I'm trying to understand the use of $_FILES and $file_handler which are making me crazy into this function to upload attachments from a frontend form. What ...
Kleeia's user avatar
  • 107
1 vote
1 answer
2k views

Uploading .mp3 files http error - 2 "exact" files one successful other fails

I have 2 equal .mp3 files - technically different files but both exported from Audacity using the same settings and the same original audio. Exactly the same size, same content (albeit processed ...
jharrell's user avatar
  • 113
1 vote
0 answers
152 views

Wordpress won't write in a CIFS drive from himself

I want to connect a virtual SMB drive to a Linux server to let peoples save their files/data in a "cloud". To do this, i'm using wordpress, and now what i have to do is to let the apache User write on ...
Nicolas Frbezar's user avatar
1 vote
0 answers
90 views

How to limit the number of simultaneous media uploads?

As the title implies, is that even possible? I have tried searching but had no luck. In slow connections, I encounter connection problem with simultaneous uploads with pictures.
Earlee's user avatar
  • 265
1 vote
1 answer
113 views

transfer a file from one domain to another via wp

I want to be able to transfer a file from one domain to another via wp. I have searched Google and this site but only found info on how to transfer entire WP sites. I was hoping to find a plugin ...
Buck's user avatar
  • 111
1 vote
2 answers
5k views

Make Wordpress upload directory outside wordpress root with custom url

I want to change the upload directory for Wordpress from project.dev/wp-content/uploads to cdn.project.dev Where subdomain cdn has DocumentRoot: HostPath/project.dev/cdn while Wordpress is located at ...
user avatar
1 vote
0 answers
439 views

Password protect any file in WordPress

I have found that password protection with .htaccess & .htpasswd files is the only way to protect any WordPress file. I wanted to make few of my media files accessible by specific username and ...
user1719322's user avatar
1 vote
0 answers
58 views

Render P2P metabox per taxonomy term

I would like to display a Posts to Posts connection registration metabox for each term in a custom taxonomy. The post connection candidates will be split across the metaboxes depending on their term. ...
Chris Montgomery's user avatar
1 vote
0 answers
159 views

HTTP Error after finishing uploading a video that is bigger than 64 MB -> After raising the upload limit manually in the wp-config file

I use Dreamhost as my web host. Previously my WordPress upload limit was 64 MB. I asked the tech from Dreamhost to boost it to 400MB. He told me I had to change a setting in my wp-config.php. That's ...
gab's user avatar
  • 11
1 vote
0 answers
78 views

Unable to upload image using the standard uploader in the WP admin (v4.3)

I am running WordPress 4.3 and in the admin I am no longer able to upload images using the standard upload image tool. I am taking over a project from another developer so don't know exactly what he/...
Zabs's user avatar
  • 111
1 vote
0 answers
122 views

Wordpress Media Library - Upload space used

Navigating to Media -> Library, I don't get the upload space used displayed: as I should based on various screenshots on the net: Im using WordPress 4.2.6 and Im self-hosted on a shared hosting plan....
lephleg's user avatar
  • 111
1 vote
0 answers
83 views

Show Custom Post Type meta boxes only on Page Edit

I've went through the laborious process of creating the CPT. I see it on the sidebar of my WP install, I can add new, save data, and on frontend I can output the data. Is it possible with WP to move ...
Zach Smith's user avatar
1 vote
0 answers
3k views

Upload Image using wp_insert_attachment and file url don't have file extension

I need to upload an image using $filename = 'www.domainname.com/images/12345'; $filetype = wp_check_filetype( basename( $filename ), null ); $attachment = array( 'guid' => ...
Aftab's user avatar
  • 1,391
1 vote
0 answers
141 views

Add custom JavaScript that is a combination of CDN/uploaded files and easily-edited code?

I would like to add some custom JavaScript to my site: a combination of external CDN-hosted files, static library files hosted locally, and local JavaScript that I'd like to be able to edit in the ...
Richard's user avatar
  • 137
1 vote
0 answers
985 views

WordPress Uploads Directory not using dates in links

I have a WordPress site that was working fine. Suddenly it started looking for media in the wrong folder: www.website.com/wp-content/uploads/path-to-image.jpg This is giving me a 404 because I have ...
JLF's user avatar
  • 119
1 vote
1 answer
524 views

Insert Featured image from Feed

I am importing products through a feed programmatically as follows: $request = wp_remote_get('myapiurl'); $response = wp_remote_retrieve_body( $request ); // decode the json $json = json_decode($...
Raja Gopal's user avatar

1
3 4
5
6 7
23