The Wordpress upload directory. [Read more about `wp_upload_dir()` here](http://codex.wordpress.org/Function_Reference/wp_upload_dir).

learn more… | top users | synonyms

5
votes
1answer
2k views

Change upload directory for PDF files

I would like to change the upload directory for PDF files only, not for other files. For example, the PDF files would be uploaded to wp-content/uploads/pdf but other files would remain in ...
3
votes
1answer
529 views

Changing upload directory for plugin uploads only

I've spent a lot of time reading the other threads on this question, but I just cannot get my code to function properly. I'm building a plugin, and I've set up an upload form on my custom admin page, ...
3
votes
1answer
707 views

Organize uploads by year, month and day

As of now my uploaded files are organized by year and month. But I would like to organize them by year, month and day. I mean like this 2012/10/30/image goes here PS: There is a plugin available to ...
2
votes
1answer
1k views

Extending WP's upload/insert media functionality

I am writing my first plugin to upload PDF files to a user specified directory other than the media directory specified in the Media menu under settings. I need to extend the WP's native uploader so ...
2
votes
3answers
2k views

How to set featured image to custom post from outside programmatically

I am trying to fetch and insert images outside the wordpress environment to a custom post via PHP. How to move/upload that image to wordpress upload directory year date folder format just like ...
1
vote
1answer
623 views

Post type specific upload folder in 3.5

In 3.4 I used the following function to change image upload folder by post type. Different upload directory based on post type in a theme Now it doesn't work anymore in 3.5. Do you have any idea how ...
1
vote
3answers
5k views

How to change the file upload directory on version 3.5?

The option to change the upload folder for images is gone on version 3.5, any way to make it visible again or a workaround ? From this core ticket: Changing the upload_path and upload_url_path ...
2
votes
2answers
739 views

Different upload directory based on post type in a theme

I have a lot of uploaded image files and image sizes. So it would be better to organize media files into folders based on post type. I have just read this tutorial, but as I can see it works with ...