[Plugin: Advertisement Manager] Filtering ads works erratic/breaks ads on pages
-
Hello:
I’m using the “Website display options” drop-down menus to prevent the ads from showing on certain posts. But it doesn’t work most of the time: i’ve tried filtering both by categories and tags, single, multiple, combined… and sometimes it works, sometimes it doesn’t (when it works, the affected ads don’t appear, when it doesn’t, the ads appears as always). I can’t find a pattern for this behaviour.
While trying to find out the reason, I’ve found out that, when I try to filter the ads as I have mentioned (from website display options), and the filter doesn’t work, there happens something more: an error appears on pages (pages, not posts). The error says:
Warning: Invalid argument supplied for foreach() in /home2/establed/public_html/wp-content/plugins/advertising-manager/lib/OX/Ad.php on line 168
At first, I didn’t know it was related to trying to filter ads,but while checking line 168 at ad.php, I located this:
foreach ($categories as $category) { if (in_array($category->cat_ID, $categoryFilter)) {
so, although I’m php-illiterate, I guessed it had to do with trying to filter ads. Maybe it has something to do with pages not having categories? Anyway, removing the filter (checking all tags and categories again for each ad) made the error go away from pages. But I still can’t filter ads selectively based upon tags or categories.
I know this is a bit generic, but I would like some idea about what to try, or which could be the reason for the filtering acting erratic (works for some tags/categories, doesn’t work for others). If there’s any extra info I may contribute, please let me know.
I’m using wp 3.0.1 and a modified mistylook theme. Thanks in advance.
- The topic ‘[Plugin: Advertisement Manager] Filtering ads works erratic/breaks ads on pages’ is closed to new replies.