I am hoping that you can help me. I've tried finding plugins to do what I want to do but none of them really simplify the problem that I am trying to fix. I am trying to build a site for my photography business. So as you can imagine, I am going be uploading many images for review and public viewing. Sorting through these many photos in the standard media structure is a pain in the butt.

I am attempting to learn how to code this myself, but I'm not sure which direction I need to take or how to accomplish my goal within wordpress. So I have two possible options I am thinking.

  1. on my photo album custom post type I will have a custom taxonomy called client that will be selected. I will also be naming the album. So when I upload images to the directory I would like to see them placed in "uploads/client/%client_name%/%Post_name%/"

  2. If it would be possible to simply upload all my albums already organized in their appropriate folder structure via ftp, and run a script that automatically creates the pages to display these albums, that could be a little easier. Though I would have to go back and insert the other gallery data.

you may notice that i have uploads/ client Client images obviously go here, but I will also have a folder for non-portraits and instead of %client_name% this would be %img_category%/%Post_name%/

This allows for a Image_type/Album/Gallery/image relationship

let me know if anyone has a way to tackle this. I'm going try to use the "advance custom fields" plugin, or "Types" Plugin for the custom fields, but I may need to hand code something to get this functionality.

I am still trying to get a handle on hooks and all in custom coding, so I'm not sure what file or function I would need to alter to accomplish this goal.

Also, I dont mind if the other site files maintain the media folder structure, but they could also be altered perhaps to store files such as product images, logos, ect. They just won't be loaded in a gallery format

A simple version of the loop that I think needs to happen is as follows: I know the actual code syntax is not there, but this should give a general idea what I'm thinking to make this work.

Define $image_type Define $client or img_category Define $Post title

$Img_directory= "uploads/$image_type./.$client./.$post_title./

For each image in $img_directory

wrap in Div add buttons to comment, favorite, purchase, and social sharing Display each div in a gallery format1

  • hmmm, while it might feel like you were asking one question you actually have several here. I suggest you try to edit it and ask one question in a time Commented Aug 8, 2014 at 4:02

1 Answer 1


This might be perfect solution for you:


With that plugin you can have upload folder structure as you wish:




Or anything you like, you can combine post title, category, post author, post date and many more in your folder structure.

  • I have that plugin actually, but I guess i dont get how to use it. How is it supposed to know what directory to put it in if i upload straight to the media folder? I will try uploading within the photo album page.
    – Jon C
    Commented Aug 8, 2014 at 21:27
  • If you upload to media directly than plugin will not do anything. To make it work, you need to do this. Open new post/page edit page (or open existing post/page) than upload image to that post/page, and plugin will automatically store that image in path you set in plugin options. Please note, you should choose category and save as draft new post/page before uploading image to tell plugin where to upload image. If you editing existing post/page you do not need to save it as draft, because it already has some category. Commented Aug 9, 2014 at 7:27
  • If you need any more help, do not hesitate to ask. Commented Aug 9, 2014 at 7:28
  • Glad to help. If you think my answer helped you, you can click on "up arrow" under answer. Commented Aug 15, 2014 at 7:24
  • Well I can't click the up vote without 15 reputation, I did click the check button if that helps
    – Jon C
    Commented Aug 16, 2014 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.