Return of the orange monster

After a short hiatusthe orange powered ninja is back and is just as badass1 as ever.

If you recall, I had been experiencing some issues with the wordpress function is_page() — in that it wouldn’t always return a valid value2 in the sidebar. After trying, once again to crack the is_page() puzzle, I was struck by a simpler, faster and stupefyingly simple alternative. You ready for it?

Call a different sidebar source page for each core page3.

*cough*

Yep.. I did say it was stupendously simple. I’ve done it before too - in fact on more than one occasion. This is what happens when a particularly crap coder takes a break from blogging, leaves a job environment that was less than pleasant, steps back and realises with a combination of illumination and forehead smacking, “the solution”, that whilst knee deep in battle against PHP was totally inconceivable at the time.

So there you go. Even Geeks have bad hair days. Go fig.

  1. .. or is that just plain bad? :) ()
  2. .. due in part to my craptastic coding skills and playing fast and loose with functions ()
  3. .. in my case home, the journal and single posts ()

≡ This is a journal entry relating to the topics of , , , .

Brendan Borlase is a Systems and Network Administrator living in Adelaide, Australia, having lived, worked and breathed Information Technology for over 12 years. Learn more.

Feedback is encouraged. If you would like to read more, consider subscribing to the regularly updated RSS Feed.