The error is generated by this code:
line 27 $tags = get_the_tags();
line 28
line 29 $cn_sidebar="";
line 30 foreach($tags as $tg_id) {
If a post has no tags, get_the_tags()
wil return false. Then supplying false
to the foreach
statement will get you the error mentioned. In order to prevent this you should wrap the foreach
in if (!empty($tags)) { foreach ...}
.