admin管理员组

文章数量:1415120

Wordpress seems to like storing files by year/month. This is nice, but not good enough for busy websites with loads of content. It'll be much nicer to have the folders reflect the exact same structure as the permalinks for them:

/wp-content/uploads/custom-post-type/category/postname-1.jpg
/wp-content/uploads/books/fiction/the-nun-1.jpg
/wp-content/uploads/books/romance/the-italian-spring.jpg

And so on. Is it possible to do this with some simple customized function in functions.php, or via some plugin?

Thanks for any pointers.

Wordpress seems to like storing files by year/month. This is nice, but not good enough for busy websites with loads of content. It'll be much nicer to have the folders reflect the exact same structure as the permalinks for them:

/wp-content/uploads/custom-post-type/category/postname-1.jpg
/wp-content/uploads/books/fiction/the-nun-1.jpg
/wp-content/uploads/books/romance/the-italian-spring.jpg

And so on. Is it possible to do this with some simple customized function in functions.php, or via some plugin?

Thanks for any pointers.

Share Improve this question asked Aug 25, 2019 at 13:12 Khom NazidKhom Nazid 17110 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

There is another thread discussing this, with multiple answers. You might check to see if they address your desires. They offer some code, and an available plugin solution.

本文标签: uploadsOrganizing uploaded Media in permalinkbased folder structure