Direct media library upload saving in wrong month date folder in custom theme

admin2025-01-07  3

I have an issue in my custom theme.

Direct media library upload saving in wrong month date folder (2017/03) when current date is 2018/09. But when I upload images through post it goes to the correct folder.

I have tested in default theme, Direct media library upload goes to the correct folder. So the issue is in my custom theme. But I am not sure where to look at. In which file of my theme has the issue? Help is much appreciated.

Thanks in advance.

I have an issue in my custom theme.

Direct media library upload saving in wrong month date folder (2017/03) when current date is 2018/09. But when I upload images through post it goes to the correct folder.

I have tested in default theme, Direct media library upload goes to the correct folder. So the issue is in my custom theme. But I am not sure where to look at. In which file of my theme has the issue? Help is much appreciated.

Thanks in advance.

Share Improve this question edited Oct 2, 2018 at 8:45 Westzone Solution asked Oct 1, 2018 at 15:15 Westzone SolutionWestzone Solution 616 bronze badges 2
  • 1 Possible duplicate of Why my uploaded picture was loaded into /uploads/2015/02 not /uploads/2016/01? – Pim Commented Oct 1, 2018 at 15:16
  • Solution is not mentioned there. Please read my issue carefully. – Westzone Solution Commented Oct 1, 2018 at 15:20
Add a comment  | 

2 Answers 2

Reset to default 0

I've found that in Settings > Media > Files upload > Save files uploaded in this folder: there's a URL that is not the default (wp-content/uploads). Check this if it can help.

The issue you're having may be related to an issue in Wordpress core that appears to affect a number of plugins. For context, see this GiveWP plugin discussion and issue. In my experience, media uploaded from within a specific post is not affected.

Currently it looks like your options are a) tolerate the incorrect month/date, b) identify and remove the affected plugin/theme or c) update the plugin/theme to avoid using the_post.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736258303a502.html

最新回复(0)