Does a shortcode with a single attribute have to use an array?
Yes, the problem is that it won’t work. The shortcode system doesn’t know how many arguments will be passed, so it gives you an array $atts that contains the attributes. When it is only one, then the array will only have one element. When no argument is passed, the array will be empty. Check the … Read more