<?php
$category = 1;
foreach((get_the_category()) as $cat) {
$cats = $cat->cat_name . ' '; if(strstr("$cats", "Free Traffic Systems") !== FALSE) {
$rated_services = true;
$category = $cat;
} else {
$category = $cat;
}
}
?>
What that does is find out if the current category page is part of the parent category “Free Traffic Systems”. The other category that it comes up with is stored as the actual category.
Now I can hard code the ID #’s in and I get the same results.
for instance. One category shows up with an id of 23 (“Safelists”). However, when I make a call to cat_id 23, I get “Banner Exchanges” for some strange reason. I have to call cat_id 24 to get “safelists” to show up.
The odd thing is that under manage categories the id for Safelists is 23… but when I look in the database under “terms” I can clearly see two entries for safelists. One with an ID of 23 and one with an ID of 24.
I really don’t know what’s going on there.
As you can imagine, this is confusing the heck out of me.
IF the categories are correct for you, have you ever deleted a category? Not one that you just created either, but removed a post or category, or even a page somewhere in the middle… then created another category?
That seems to be where all my problems started.
It’s not the theme, I know it’s wordpress.