Different Category template pages
-
I have been reading the Codex about the use of creating a specific file for each category ID (i.e. ‘category-2.php’), and it seems that this is an easy way for me to break out the sections of my website. I want to be able to create a series of templates that arae categroy specific. I can do that no problem. However I have changed the BODY class in my CSS to display a single background image for the main page + main category section for the site. However say one of my categories is a ‘Photo’ section and I want to link from the home page to this category but the background will be reading the main CSS page. I am sure I can make a subclass or something, but wanted to make a header for each page. SOO.
I dug up the ‘template-function-general.php’ file and saw the function for “get_header.” I copied it and made a new function called ‘function get_pheader’ and I am getting errors. I have a file there called ‘photo-header.php’ that the function calles, but it does not work. Here is the code
Fatal error: Call to undefined function: get_pheader() in /Users/danmerk/Sites/wordpress/wp-content/themes/default/category-2.php on line 1
- The topic ‘Different Category template pages’ is closed to new replies.