I am using WordPress. I have an image folder like mytheme/images/myimages
.
I want to retrieve all the images name from the folder myimages
Please advice me, how can I get images name.
I am using WordPress. I have an image folder like mytheme/images/myimages
.
I want to retrieve all the images name from the folder myimages
Please advice me, how can I get images name.
try this
Check if exist, put all files in array, preg grep all JPG files, echo new array For all images could try this:
you can do it simply with PHP
opendir
function.example:
This answer is specific for WordPress:
Here are some other settings that will give you images from other places than the child theme. Just replace the first 2 lines in above code with the version you need:
From Uploads directory:
From Parent-Theme
From Child-Theme
You can simply show your actual image directory(less secure). By just 2 line of code.