Lotsa “unique category” options — but which is best?
-
I’m working on a site that’s basically a clearinghouse of information on Franco-Belgian comics. There are eight categories within the site, ranging from general to news to podcasts to “fansub” translations.
I would like each category to have its own variant of the site header image, and also to use the dominant colour in each category header image for h1 and h2 tags, the sidebar background colour, etc.
I’ve been doing a lot of reading on how to accomplish this, and — in theory — I think there are (at least) four ways to go about it.
But I don’t know which is best. Web design is an art AND a science, and I’m trying to find the best solution in terms of page load times + ease of maintenance + lowest probability of something going terribly wrong.
I’d like some more seasoned opinions on which is best.
FIRST OPTION: No category pages and one header.php using if/else to call header images and styles, with a stylesheet for each category:
1. Put if/else commands into the header.php to call category-specific header images (e.g. newsheader.png, interviewsheader.phg, etc.);
2. Put if/else commands into the header.php to call category-specific stylesheets (e.g. news.css, interviews.css, etc.).OR
SECOND OPTION: Individual category pages with individual header.php and individual css files for each category:
1. Make a different category-x.php file for each category;
2. Have each category-x.php call a unique header-x.php for that category (using “〈?php include (‘header-x.php’); ?〉” instead of get_header);
3. Have each header-x.php call its own category-specific header image and stylesheet.OR
THIRD OPTION: Individual category pages, only one header.php and one style.css
1. Put if/else commands into the header.php to call category header images;
2. Make a different category-x.php file for each category;
3. Make unique DIVs for each category style (i.e. div id=”container-news”, div-id=”container-interviews”, etc.) in each category-x.php page;
4. Have all relevant styles in one huge style.css rather than having a unique style.css for each category.OR
FOURTH OPTION: Individual category pages, with the headers and unique-to-that-category CSS right in the category-x.php page.
1. Make a different category-x.php file for each category;
2. Remove the get_header command and just put the header in the category-x.php file with the link to the relevant header image, and calling the general style.css;
3. Put all category-relevant CSS information in the category-x.php file to override the style.css.…which of these seem like the best approach? Are there any that are just a total waste of time?
- The topic ‘Lotsa “unique category” options — but which is best?’ is closed to new replies.