API/function to programatically get a list of all photos in a folder
-
I am trying to programatically loop through all folders and then process images within the folders. I’m able to get all of the folders, which gives me an ID and the folder name. The IDs are something like 43, 44, 45, 46 etc.. but I’m not seeing what those actual ID’s relate to in the database. In the admin area when I look at folder content I see something like /upload.php?post_type=attachment&media_folder=folderName-1637479099&paged=1 but I’m not sure what the 1637479099 is related to. I was thinking I could do a WP_Query off post_type attachment and use meta_query, but that wasn’t seeming to work.
Any suggestions or solutions? Hopefully that was clear.
Thanks!
- The topic ‘API/function to programatically get a list of all photos in a folder’ is closed to new replies.