I’m assuming it has been missing for a while.
WP gets the info about the theme from the style.css file…. so if that file is missing the proper header.. your theme won’t be recognized.
/*
Theme Name: THE THEME NAME
Theme URI: http://yoururl.com
Description: YOUR DESCRIPTION.
Author: THE NAME
Author URI: http://anotherurl.com/
Version: 1.0
Tags: WHATEVER, YOU, GOT
This theme is licensed under the GPL.
*/
Thanks for the reply. No, it was literally from one page to the next.
style.css header (from server themes/FPC and just copied down) is:
/*
Theme Name: FPC
Theme URI: http://www.kokomobeach.com
Description: A theme for First Presbyterian Church of Kokomo, Indiana
Version: 0.1
Author: Steve Jones
Author URI: http://kokomobeach.com
* The fonts included are copyrighted by the vendor listed below.
*
* @vendor: GUST e-foundry
* @vendorurl: http://www.gust.org.pl/projects-1/e-foundry
* @licenseurl: http://www.fontsquirrel.com/license/TeX-Gyre-Bonum
*/
Further information: The template and stylesheet options in the wp_options table had been set to “default”. When Bluehost’s tech edited those two rows and set them both to “FPC”, the site correctly displayed that theme. Opening the “Manage Themes” page caused WP to reset the theme back to default. So I wrote my own SQL query to restore “FPC” in those two rows.
In the last hour, I have seen the admin page (a) make no mention of the FPC theme and reset to default or (b) report the active theme (FPC) broken but not reset to default. How these alternate behaviors are selected is a complete mystery.
So there’s a work-around but no explanation or permanent fix other than monitoring and fixing as needed.
The workaround is only partial. Because I can’t make FPC the “official” theme (via the admin screen), none of its templates are available for creating new pages. This all started when I was reviewing (not changing) the use of templates on the site in preparation for designing a new one. In order to be able to use a new template, I’ll have to (a) fix this problem, (b) define a new page in the admin screen and apply the template by manually editing the backend database (not sure how), or (c) implement a new site using WP 3.1 because the existing one is obviously too fragile to attempt an update.
Still looking for suggestions for option (a).
Mea culpa. The (unused) index.php file had gone missing from the theme folder. The only time line that makes sense is the following:
- index.php was deleted (could have been months ago)
- A visitor (me, in this case) is clicking around the site with the custom theme applied
- During this visit, someone (?) goes into the WP dashboard and clicks on “Appearance”
- WP populates the list of available themes, deems the active one broken, and sets “default” as the active theme
- The visitor clicks on another link and sees the newly-applied “default” theme
There are still a few oddities that I don’t quite understand, but no matter; I hope someone else learns from this embarrassing episode.
If you uploaded a fresh copy of the theme, then the index.php file should have come up with it. Also, you may want to upgrade to a more recent version of WordPress. (At this time 3.0.4 or higher) There are a few security fixes which were released in these later versions. Upgrading may also fix any buggy code you may have which may have been contributing to this problem.
Thanks for the reply. It was missing from my local copy as well. I suspect I refreshed my local copy from the server but it’s probably been 10 months since I would have done that….
Because of a name change (our name is reflected in our domain name), we plan to move to a new domain in the next few months, so I’ve put off upgrading the current site. The new domain will include a fresh install of the WP version current at the time. I’ll look at our use of plugins, custom fields, and so on to see if there are new features that will eliminate some custom templates and/or code. The new site will essentially be a sandbox for a week or so, so it’ll be a good opportunity to clean up and optimize things.
Things look pretty stable now. I’ve deployed two new templates with – so far – the planned results, so I’ll forge ahead for now. Not disagreeing about the upgrade, just thinking through the logistics and my (planned) workload.