Support » Fixing WordPress » Best way to add named subfolder to Media Library

  • Seemap


    I have a custom post type which uses a gallery of attached images that for various reasons I do not want to store in the normal date folder structure in /uploads (a normal WordPress Gallery, not with any plugin). My question is, what is the best way to achieve this? This is what I have tried so far:

    1) adding a function to the upload_dir filter that changes the upload directory for the custom post type only. Result: did not work because it changes the base upload url for everything on the page, which screws up the layout.
    2) manually uploading images to a named subdirectory in /uploads (they do not need to be resized) by ftp and adding them “from url” in the Add Media window. Result: did not work because the images can only be inserted directly into post, not saved and used as a gallery.
    3)searched online and in the forums for a solution from anyone who has managed to achieve this. Result: I found a lot of people annoyed with the Media Library date structure but no answer!

    Can anyone make any suggestions as to how this could be achieved (or a definitive reason as to why not)? Hacks are fine, as long as they are not too dirty 🙂

  • The topic ‘Best way to add named subfolder to Media Library’ is closed to new replies.