I have been trying to figure out for the better part of a week now how to set up what appears to be an advanced little gig for my sidebar.
I have many posts that each fall under at least 2 or 3 categories.
What I want is for when you enter a post (lets say post1) on single.php from (lets say category1), the sidebar will show everything else in category 1 on the sidebar.
That parts not too bad, this is where it gets tricky. I want it so that if someone enters post1 from category2 the single.php will now show all the items in category2.
I have tried tons of things from $_SERVER['HTTP_REFERER'] and in_category to now creating my own function to set a value to a variable when a category page is opened.
The variables work but when I try and use the variable in the sidebar it doesnt show.
Anyone has any ideas I will gladly listen, cause I am almost out.