I am having a quite odd case with WP today, and after spending about an hour searching on google and forums, can't find any answers. I hope posting here might allow me some chance to get help from WordPress Wizards that lurks somewhere on this support forum :)
Anyway, my problem here is that I accidentally deleted page.php on my template (I am trying to remove all default template and make WordPress more personalized and customizing backend). I wanted to remove the template called 'Default Template' and make the template dropdown on pages shows like:
One Page Template (or just a random name)
Grid 2 sidebar Template (or just a random name)
Store contents (or just a random name)
After I deleted page.php -- the Default Template didn't removed at all, I still got it, and I got no way to style or remove it. Adding to the problem is when I recopied page.php from my repository, I got DOUBLE template called 'Default Template' now!
I tried to replicate the problem by installing a fresh copy of WP 3.1.2 and duplicate 2010, and then I activate that duplicate. Here's my steps:
- Delete page.php and page-with-sidebar.php
- Check pages, now I got 'Default Template', but no page.php
- Recopied page.php
- Check pages, now I got TWO 'Default Template'
- Switched to the original 2010 -- check pages -- works OK, with one 'Default Template' and one 'Default Template with Sidebar'
- Switched back to the modified 2010 -- check pages -- still got double 'Default Template'
Now, what I see here is that this problem definitely happens because I deleted page.php -- and it's stuck on the Theme, not on the wordpress installation itself. To make the matter worse, I can't find any file that is updated because of it -- really amusing.
This is what looks close to what I have, but not really:
- http://wordpress.org/support/topic/page-templates-gone-wp-271
- http://wordpress.org/support/topic/missing-template-files-makes-wp-fall-back-on-default
My questions:
- What should I do to fix the problem? I wanted to know if there is anyway to return the theme to recognize that we already got the page.php back.
- How to remove the 'Default Template' from the dropdown lists of
page template? Maybe through unset
call on functions.php ?
Many thanks in advance.
Andre