in_category doesn’t work above the loop
-
Hey. It appears that after I asked about, and solved, a problem with in_category and these weird errors, I found out that in_category, no matter what, won’t work above the loop. Comes out with this error:
Warning: Invalid argument supplied for foreach() in /home/.tahlula/plaincul/daysdifference.com/wp-includes/template-functions-category.php on line 438
Warning: in_array(): Wrong datatype for second argument in /home/.tahlula/plaincul/daysdifference.com/wp-includes/template-functions-category.php on line 442
It’s the same error I would get if there weren’t any posts in a category, or if there wasn’t a new post posted, or weird things like that. That happened either in the loop or under the loop, and those things were solvable. The difference now is that no matter what I’ve tried, in_category() won’t work above the loop.
Why’s this? Is there a way I can solve this? Appreciate the help again, thanks. ??
Update: submitted a bug report here, with WP 1.2 and 1.3 index.php files–sort of a before and after with in_category().
- The topic ‘in_category doesn’t work above the loop’ is closed to new replies.