Mystery Solved: Why My Theme Was Defaulting Back To The Default

Share it with your friends Like

Thanks! Share it with your friends!


GEEESSSHHHH! It’s frustrating enough to wake up and wonder if anybody is reading your blogs, but even more so to waking up and seeing if your template is back to the default theme.

I apologize to my readers who also had to endure this, if it affected the functionality of this blog, in addition to the 1-800-HART’ish look and feel that has existed.

Here’s the reason I was worried the most: Is someone hacking into my site?

Well .. as it turns out either:

* there is some new checks and code in WordPress 2.1 ..validate_current_theme() .. .. It checks for existence of certain files, and if for whatever reason .. PHP file_exists() .. code returns a “false” answer the default theme is activated.
* or something new is happening and/or I’m getting conflicting plugins in the new wordpress version.

So .. what was causing this false answer?

Mobile Text Readers

That’s right. Someone is reading this site using the PDA or Blackberry or Palm Pilot or something and afterwards, my theme defaults to the “Default” theme in wordpress! You see .. in addition to reading this blog in your favorite browser or RSS Feed reader, I have installed a plugin called WORDPRESS MOBILE EDITION by Alex King which simplifies this page to enable it to be read on mobile devices, where space is a premium .. It’s actually been installed in this blog since July 25, 2005 ..

But .. LIKE EVERYTHING ELSE … I never read instructions .. and WordPress version 2.1 caught me. The zip file for the plugin looks something like this:

* wp-mobile.php
* wp-mobile/
* wp-mobile/style.css
* wp-mobile/comments.php
* wp-mobile/index.php

What I did – was copy the entire wp-mobile folder and the actual plugin file into my plugin directory. The instructions clearly states that I should copy the wp-mobile into my theme folder – and I never did that. I have no idea how it was working before, but with wordpress 2.1 – it seems to have figured out that the wp-mobile folder did not exist in my themes folder, and was the root cause of switching back to the default theme.

At least that’s my story and I’m sticking to that

So .. for existing mobile readers … please read away!

For non-mobile readers .. hopefully the VIEW won’t change here anymore, because I have supposedly fixed this issue … but, feel free to go buy a mobile-internet ready cell phone or PDA and try me out 🙂


* WordPress Support
* Scott Burkett
* Alex King and his README.txt!


Write a comment