[QUESTION]Templates for categories - How to?

cyklotrial

Regular Member
Oct 13, 2008
248
82
Hello!

I have a small problem with wordpress.
I would like to use WP Categories as a subdomains.
Each "subdomain"(category) should have diffrient theme.(Is there any plugin that will let me setup diffrient theme for each category?) How to do this without having separate WP installations on each subdomain? - I want to have acces to all of them via one "control panel".

thanks
 
Last edited:
I think setting up htaccess rules in each subdomain root might work. You basically make a rewrite rule so that a call to subdomain.domain.com triggers domain.com/category/subdomain. You will have to manually create the subdomains though or code a plugin to get them done automatically when you create a new category.

http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
The "Virtual User Hosts" is close to what you need (but needs adapting).
 
Last edited:
I know how to setup category as a subdomain :)
But have no idea how to make that each category will have its own theme.
 
oh, for that you create theme files named category-categoryslug.php or category-ID.php (is is the numeric ID of the category) in your theme's directory. So, for widgets category you make a category-widgets.php file. That basically instructs WP that you want that specific page to be used when rendering listings of that category. To also cover the posts within that category you have to add some code in the post.php template file so for example it does an include or require on a different category-specific template file of post.php. All I can tell you is that it can be done, telling you how exactly to do it would take some time for me to test and stuff, time that I don't have.

This is the WP template hierarchy: http://codex.wordpress.org/images/1/18/Template_Hierarchy.png
Also look at: http://codex.wordpress.org/Function_Reference/in_category

good luck!
 
Thanks madoctopus, but it's still not solving my problem.
Why? Cos i want to use diffrent themes for each category...
So i want to "movie" to use On Demand theme, "music" Backstage yheme etc etc.
I think tha the easies way to do this will be creating separate WP blog for each category/subdomain and than use or create Main page+multiblog control panel...

thanks
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock