Lesson learned
-
In a formal sense, I didn’t hack. I created a child theme with child templates; I am a good boy. Never the less, Zeus smote me with a lightning destined for hackers. I wanted to spruce up pages for a book project with elaborate page navigation. It wasn’t difficult, and in a few hours it was done – beautiful, exactly how I had imagined it. Everything worked, except, the wp-admin-bar didn’t show anymore. Well, maybe there was an update?
When I started to hunt down the problem, I realized that I had inadvertently called one of my loop variables by the same name used somewhere else in the model template. That couldn’t have happened in a strongly typed language, but that’s why we love php.
Wouldn’t it be nice if there were a WP variable naming convention that clearly distinguishes add-on variables from legacy variables?
The topic ‘Lesson learned’ is closed to new replies.