Hi
First, thanks for a useful little plug-in.
(I'm a competent user, but know little about php)
I used the function: foreach(get_tag_image as $tag) echo get_tag_image($tag) in my post, however, if a post did not have any tags associated with it I got the error Invalid argument supplied for foreach() ...
Anyway, after some searching and figuring out some php, to which I'm new, I ended up adding the following codes instead, to evaluate an if statement first to check there were any tags before getting to the foreach statement, as follows:
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) echo get_tag_image($tag);
}
?>
Which seems to work fine.
- Just wanted to post this here to help anyone else who might pick up this error and want to fix it. Or if anyone else has a better/simpler way to fix they can advise...