Confusion over template files
-
I have a strange situation going on with a static customer site that I am converting to WP. Since the static site had a left and right sidebars and a central content area I added and registered a second widgetized sidebar to a child theme in twentyeleven. This went very well and is working fine. However, when I go into the Edit Page panel in admin the template listed for all static pages is “Sidebar Template.” Initially, I thought this referred to sidebar.php, which I altered to add the extra sidebar; but the sidebar.php file has no calls to “header-sidebar-or footerphp,” so how could it be functioning as a “template file?” Eventually, I decided to look in the twentyeleven (non-child) directory, and there i found a file “sidebar-page.php,” and in the PHP at the top of the page was Template Name: Sidebar Template. Apparently, I created this file in the process of adding the extra sidebar and forgot that I did it.
I guess my concerns are as follows:
I am nervous about having a template file with the filename of “.sidebar-page.php” and the name of “Sidebar Template” for all of my static pages. Shouldn’t this be “index.php,” and “Index Template?”—especially since my “front page” is a static page. (I looked at the index.php file and it had no “template name” at the top.) Should I re-name “.sidebar-page.php” and “Sidebar Template” to “index.php,” and should I name “index.php” as Index Template? Or does index.php have special meaning in WP.
I am worried that a bunch of small errors will create big problems that are hart to unravel later.
I apologize if I am asking too much.
- The topic ‘Confusion over template files’ is closed to new replies.