How to set uploaded images directory by post id in wordpress ACF image?

I want to know how to set uploaded images directory by post id in wordpress ACF image using repeater. When i try with wp_insert_attachment, it OK in images upload with post ID. It also save to post table guid field with inserted file path. But in media images, it not display images and uploaded images path are not the same with guid image path.

It display with example.com/wp-content/uploads/filename.jpg. i want to show images with the following link.

example.com/wp-content/uploads/2014/06/1/filename.jpg

How i can show programmatically added images with guid field in wordpress backend and frontend AFC field?

Thanks

Read more here: How to set uploaded images directory by post id in wordpress ACF image?

Leave a Reply

Your email address will not be published. Required fields are marked *