I am using WP 2.2 and Chris Pearson’s CopyBlogger theme. I am setting a site where the blog is NOT the main page. I would like to have a sidebar for the site, because I don’t want recent posts, comments, etc showing up all over the site and then a sidebar for the blog with the aforementioned options.
Here is what I tried. It couldn’t be this easy though, could it :). I uploaded a second sidebar.php but changed the name to blog_sidebar.php. I changed the div class to the same on that file. I then went to the Index.php (which is what the blog is based out of, correct?) and changed the php get from sidebar.php to blog_sidebar.php.
On the page I got a fatal error in the sidebar and in the footer.
It works the other way around… get_sidebar (and get_header & co.) are functions defined in the WP engine (core files) so, don’t change them!
To call different custom template files that reside in your theme directory, use this: <?php include (TEMPLATEPATH . "/yourfilename.php"); ?>
Use it as it is, just change the filename!