Shortcode for upload DIR w/ date/year
-
I am using WP All Import (AWESOME plugin btw) to bring in a feed every 15 minutes that includes photos. Because the photos are brought in after the post, I cannot directly add them to the import template so instead I am using a shortcode to show the post_tumbnail (which the import can set).
I need more control over this for captioning/positioning purposes. Since I know the filename of each photo, I can add am IMG tag with a URL but I need this to be dynamic since my uploads must be organized by date because of the volume of photos we have (roughly 900 a day).
So what I am looking for is a shortcode or a PHP str_replace that can output the following:
https://www.sitename.com/wp-content/uploads/2015/02/
right nowand
https://www.sitename.com/wp-content/uploads/2015/03/
starting March 1 and so on.Does such a beast exist? I admit I know enough PHP to just be dangerous and I have been woefully unsuccessful so far in figuring this one out. Any pointers would be greatly appreciated.
- The topic ‘Shortcode for upload DIR w/ date/year’ is closed to new replies.