Forums

Custom Upload Dir: Use Variables in Path ?? (7 posts)

  1. wwwalker
    Member
    Posted 1 year ago #

    I would like to include a variable in the path at the top. I'd like the main path to be something like this:

    wp-content/blogs.dir/7/files/%user_identity%

    can i do this ??

    Please email me or let me know how I could do something like this with this plugin.
    Thanks !
    -Nate

    http://wordpress.org/extend/plugins/custom-upload-dir/

  2. ulfben
    Member
    Posted 1 year ago #

    'post_author' is available in Custom Upload Dir 2.5

  3. bile
    Member
    Posted 1 year ago #

    Would you be willing to add the ability to create a path with the ancestors? For usage like a CMS. Page A, parent to B, parent to C would end up with wp-content/uploads/a/b/c with %post_title% or perhaps a new tag %post_path% or the like.

    Perhaps different methods for pages vs posts?

  4. ulfben
    Member
    Posted 12 months ago #

    That is a great idea! I'll definitely look into it for the next version.

  5. bile
    Member
    Posted 12 months ago #

    Thanks. I hacked together the ancestor path but it looks like those aren't consistently saved. At one point it worked as unpublished and other times not. It always worked in preview though. Perhaps its something I'm missing.

  6. ulfben
    Member
    Posted 12 months ago #

    Feel free to send me your code when you get it working reliably. :)
    (ulf a/t ulfben d/o/t com)

  7. metal450
    Member
    Posted 9 months ago #

    As wwwalker suggested, I'd love to be able to use variables in the path at the top - so I can have "fixed strings" interspersed with the variables (the way it is now, variables can only come after user-defined text).

    For example, currently, you can have paths like:

    /content/galleries/%year%/%post_title%/

    I'd like to achieve paths like:

    /content/%year%/galleries/%post_title%/

Topic Closed

This topic has been closed to new replies.

About this Topic