Using a seperate theme for a category
-
Okay, I know that by creating a category-x.php, WordPress will display that on my category pages. However, here’s where I run into trouble:
I want to use a seperate theme for a category, so I download and get ready to use the theme. However, if I rename the index.php of the category theme to category-x.php and place it, and it’s needed files into the directory, it’ll attempt to copy over my header.php, footer.php and sidebar.php of the main theme. I tried to rename the files themselves and reflected the renaming on the category-x.php (exp. I chanted get_footer to get_footer2), but, when I uploaded everything and tried to access the category, I was given a php error for an invalid funtion (the get_footer2). So, my questions are:
Can I place the category theme, with the files unchanged, into a sub-directory in my main theme and call them with a simple .php file? Like, the category-3.php file in my main directory will simply re-direct the query to the category-3 inside the category theme sub-directory…
or
What is a valid naming structure in PHP so that I can rename the header, footer and sidebar files, call them in the category-x.php file, and let all my template files sit happily in one directory?
Sorry for the long winded-ness, I just wanted to be thorough.
- The topic ‘Using a seperate theme for a category’ is closed to new replies.