Shortcode with a foreach and arguments
Here is your problem: foreach ($files[0] as $file) { There is no $files variable, so there is nothing to loop through. You can’t pull variables out of thin air and expect PHP to understand your intent. Computers are very literal, in the most extreme sense. They can’t intuit what you meant, or want. This code … Read more