Feb
23
2009
Why Certain Themes Won’t Preview Properly in WordPress
I have been developing some themes for WordPress and I couldn’t understand why they wouldn’t appear in the preview when they were selected. I went through all of my code and tested removing parts that I thought might be the cause and no luck. Luckily enough I stumbled upon WP Contempo and found a solution.
They state that WordPress does not like spaces in their theme folders. So something like “magazine basic” won’t do it. But what I also noticed, was that “magazine-basic” won’t do it either. The only way to name a folder so that the WordPress preview works properly is to use the underscore. So something like “magazine_basic” works perfectly.



Thanks for this. I had a development skin named with hypens that suddenly stopped working and it was confusing me very badly. Changing to underscores fixed it up.
This a 2.7.1 issue? I never noticed the preview not working until tonight. All my devlopment on 2.7.0 with the hyphens worked fine.
I only noticed it with 2.7 but I can’t say for sure that it did not occur in 2.6.
oh my gosh. thank you for this! I was like, “wth, I can’t preview my themes but I can preview the default and classic.” My themes were all in hyphen hahaha. I’m glad I saw your post. Thank you so much.
Oh, this was so helpful of you to post. I love it when people “bother” (no bother at all for some of us — I suspect you’re included in that sentiment) to let others know. It’s such a good thing to put oneself in the shoes of others being frustrated by technology or anything else for that matter. Bless you for it.
I had to take it a step further and not even use underscores.
Also, it’s a good idea to do a global search for your old folder or subdirectory name in all of your template files if you’re not starting from scratch but rather doing an overhaul on an existing theme. I had an additional style-sheet-call hiding in my “single” file.
I’m trying to convert from table layout to div and css to speed up loading, so I have a mess. It’s such a relief to be able to preview.
Thank you! I was ready to pitch the whole thing and start over. Thanks for blazing that trail.