UPDATE!!! Please use GYS Themed Categories 2.0 instead of this one. It does the same job, written by the same guy (myself) but this time it works.
Download GYS Themed Categories 2.0 Now!
Note: I’ll be keeping the old (non-working) for those with older Wordpress versions.
This plugin works with Wordpress 2.3.3 and Wordpress 2.5
Update: After a long time, I finaly had the chance to update and fix the bugs in the plugin. From v0.1b, I can now say that it’s a true v1.0. This should work with the latest versions of Wordpress now. Just overwrite themed-categories.php with the latest version and you’re all set.
2008-04-24: Fixed the redirect bug. Plugin no longer needs to redirect now.
Download Themed Categories Plugin v1.0
Introduction
I had to create my first wordpress plugin due to necessity. One of my clients require that he be able to assign different themes for each category. I have seen this feature in the Wordpress Subdomain Plugin but I can’t use it as is since my client doesn’t want his categories to be subdomains. I looked at the code of said plugin and said to myself, “heck, this is easy.”
Inspired by the subdomain plugin, I decided to write my own plugin learning from both actual code and the wordpress plugin API. In approximately 4 hours, I was able to come up with my very first Wordpress Plugin and I love it! Hehehe.
Introducing, the Themed Categories Plugin. It’s in its early stages so I will be glad if any of you can help me improve it. With it, you can assign different themes to each of your wordpress categories.
How to Install
To install it, just download the file, unzip it to your wordpress plugins folder and activate it.
How to Use
To use it, simply go to Manage->Categories, edit the category you wish to assign a theme to, select the theme from the “Select category themed” dropdown, and save it.
Disclaimer
Lastly, I haven’t tested this extensively but it seems to work fine under Wordpress 2.0. I have no plans of testing it in Wordpress 1.5 so please don’t bother me if it doesn’t work there. After all, it’s easier for all of us to simply upgrade to 2.0.
Thanks! Post your comments and bug reports below.
October 18th, 2006 at 10:08 am
nice, I’ll try to test it later. I havent tried creating my own plugin but i wanted to. hehe maybe if i’ll have more time, yeah that’s after school. Anyway, kudos to you for this uber nice plugin..
October 30th, 2006 at 11:38 pm
Thanks from Barcelona, Spain
November 26th, 2006 at 9:01 pm
Thank you from Japan;)
January 22nd, 2007 at 6:39 am
I want to congratulate you for creating this plugin. I was looking for something like this for my Wordpress 2.0 install as I just wanted to include a different template for each of my niche categories. I did loads of searches looking for the solution and just as I was about to give up on ever actually being able to achieve this – without having to write or change loads of code – I eventually came across your blog with your plugin. Thankfully, it worked great, it was simple and straightforward to install. Well done and keep up the good work and thanks again
April 3rd, 2007 at 4:42 am
Has anyone had any success with this plugin under WP 2.1? It’s not working for me…
July 2nd, 2007 at 1:25 pm
I just tried to use it on 2.2.1 and I don’t get a select theme dropdown in the Edit Category menu.
August 14th, 2007 at 8:08 am
It was working fine until today, all in sudden my site got offline due to this plugin. There’s definitely a problem with WP 2.x series when WordPress automatically tries to save posts, this plugin conflicts with it, and causing the site to down.
Perhaps shutting down auto save on 2.x series would work well.
August 28th, 2007 at 4:45 am
Mike,
Great template, but I was hoping you could give me a hand. I’m trying to set up the template for some of the niche sites I’m working on, but for some reason I can’t get the adsense to display properly on my home page.
It comes up correctly on the other pages that I’ve created on the subdomain, but on the main page I only get adsense related to blogging tools, wordpress, and various templates. On this particular one I’m trying to come up with car insurance related ads, but it isn’t happening.
Any suggestions on how I can address this?
August 29th, 2007 at 10:41 am
Hi Jim McMenamin,
I experienced that before. Just wait for Google to properly index your site. In my previous experience, it took I think almost 10 days before the right ads started showing up. For now, just keep on updating your site with content.
Mike
September 11th, 2007 at 2:54 am
ive been looking for somehting like this, my php is weak so this really has helped me out! thanks.
October 11th, 2007 at 4:50 am
Oups !!! i have an error msg :
Erreur de la base de données de WordPress : [Table 'discussi_blogddg.wp_themed_categories' doesn't exist]
SELECT cat_theme FROM wp_themed_categories WHERE cat_ID = 9;
October 14th, 2007 at 7:08 am
try disabling then re-enabling the plugin. also what version of wordpress are you using?
October 25th, 2007 at 7:04 pm
Cool, will definitely try it out. Thx
November 1st, 2007 at 4:08 pm
Hi! So does this work in 2.3 or 2.3.1??? Has it been updated recently?
~G
November 1st, 2007 at 5:04 pm
haven’t tried it yet.
November 6th, 2007 at 10:44 pm
Great plugin, searched a long time to find it …..
but….
it does not work with wp 2.3 and 2.3.1
The install is no problem
The dropdown menu is ok, and i can choose a theme also….
But the selected theme does not shows up in the selected category….
I (we) will appriciate an update!
Thanks in advance and keep it up!
November 19th, 2007 at 5:21 am
Great work, thanks.
I run WP 2.3 on a Blog I administrate. There I had to patch Your plugin a little to work.
I appended the “ignore case option” for the categories page the regexp to look like this: “operatestr = operatestr.replace (//i, substitute+”");”. Then the DB structure changed a bit. Don’t know it exactly but a first look brought me to the following SQL for the function tc_template_redirect in the is_single block: “$cat_id = $wpdb->get_var (“select {$table_prefix}term_taxonomy.term_taxonomy_id from {$table_prefix}term_taxonomy, {$table_prefix}term_relationships where {$table_prefix}term_taxonomy.term_taxonomy_id = {$table_prefix}term_relationships.term_taxonomy_id and {$table_prefix}term_taxonomy.taxonomy = ‘category’ and {$table_prefix}term_relationships.object_id = {$wp_query->post->ID} LIMIT 1″);”. This works for me now. If You have any suggestions please let me know. Every comment is welcome! You may want to download my little changes from http://www.gschmarri.org/wp-content/uploads/plugins/themed-categories-23.zip for a while.
cu
Kalle
November 19th, 2007 at 6:07 am
Ups? Where has gone my comment?
Wanted to point out one more thing. is_category changed also in WP2.3 I think. So I had to replace “$cat_id = $wp_query->post->category_id;” with “{ $cat = get_the_category(); $cat = $cat[0]; $cat_id = $cat->cat_ID; }”.
December 2nd, 2007 at 1:56 pm
great great great! anyone been able to resolve the issue of the changed category theme not carrying over when looking at individual posts in the category
January 15th, 2008 at 8:51 pm
same question s noirlecroi’s last post, anyone figure out how to keep post pages in category to same theme as category theme?
January 22nd, 2008 at 2:43 pm
Would LOVE a published update of this theme! Thank you so much.
February 20th, 2008 at 2:23 am
Oups !!! i have an error msg :
WordPress database error: [Table 'pithecanpodpus.wp_themed_categories' doesn't exist]
SELECT cat_theme FROM wp_themed_categories WHERE cat_ID = 3;
March 16th, 2008 at 3:32 pm
Hello to all… Please download the latest version of this plugin now. I fixed the bugs and it should now work with the latest versions of Wordpress. Sorry for the long delay, I got really busy. Cheers!
March 25th, 2008 at 8:38 am
Hi,
your Themed Categories Plugin is great for me…
I can apply different themes to different CATEGORIES… ok is simple and nice…
but i would ask you if was possible to have a plugin for apply different themes to different PAGES…
March 25th, 2008 at 8:49 am
Hi Thanks for giving it a try. As for different themes for pages, I’m sorry but I don’t have such a plugin.
April 7th, 2008 at 11:14 pm
cool! thanks a lot! u made my day
nils
April 10th, 2008 at 10:37 am
Hi,
Can anyone confirm if the latest version works with WP 2.5? Thanks!
April 10th, 2008 at 3:53 pm
Hi,
Just tested it with Wp 2.5 and it works fine. The theme selection dropdown appears when I edit a category.
Mike
April 10th, 2008 at 9:29 pm
Hi,
I can also see the theme selection dropdown here. However, the changes are not saved (after I select a theme and click edit category), because the plugin does not seem to have any effect?
April 11th, 2008 at 1:59 am
Hi Louis,
To test the plugin, I installed Wordpress 2.5 here:
http://mikelopez.info/wp25/
And created two posts – each on a different category.
Unthemed: http://mikelopez.info/wp25/?p=1
Themed: http://mikelopez.info/wp25/?p=3
The categories are at:
Unthemed: http://mikelopez.info/wp25/?cat=1
Themed: http://mikelopez.info/wp25/?cat=3
Seems to be working fine. Cheers!
April 13th, 2008 at 8:47 am
Hi I ve just tried this plugin but I can’t find the “Select category themed” dropdown tag? Where is it? I am using WP 2.5 …
April 13th, 2008 at 2:21 pm
Hi,
It only shows when you “edit” a category and not when you “add” a category.
Mike
April 14th, 2008 at 1:27 pm
Hi,
Thanks. On a hunch, I tried out the plugin on another WP2.5 installation and this time the plugin does exactly what it is supposed to do! So I think the problem must be to do with this particular instance of WP2.5 and perhaps incompatibilities with other plugins? Anyway I will try to get to the bottom of this . Thanks again, and an excellent plugin, if I can get it to work on the original domain I was asking about.
April 14th, 2008 at 5:34 pm
Hi again,
It turns out the table themed_categories (defined in tc_install) were never created for some reason in my case. After manually creating the table using phpmyadmin, everything is working fine now.
April 16th, 2008 at 4:16 am
Hey all,
I love the plugin, but I’m running into one problem.
I, like a lot of people, use Feedburner for syndication. When Themed Categories is activated, the Feedburner feed returns a 500 error stating the server redirected too many times.
Has anyone else run into this, and if so how did you fix it.
WP2.5, by the way.
Love the plugin; I just wish I could use it.
April 18th, 2008 at 5:59 am
Follow up:
I’m finding the plug-in is killing my rss feed altogether, ignoring Feedburner.
Any help would be appreciated.
April 24th, 2008 at 12:31 am
Hi, again.
Just wondering if anyone (or perhaps Mike since he knows the plugin better than all of us) has seen the 500 redirect error and has found a way to work around it.
I’m finding the error isn’t just feed related — it’s a general 500 error that prevents even things like posts in a themed category from being dugg.
Thanks!
April 24th, 2008 at 2:06 am
Hi Chris,
Thanks for reporting the problem. There was some old code in the plugin causing the redirect – back then, it was the only way I know to make the plugin work but experience change people often times making us better.
To make the long story short, I’ve fixed the bug and updated the plugin. You can download the latest version now and see if it works on your end.
Mike
April 27th, 2008 at 7:42 pm
This will be a replacement of WPMU to seperate the content however there is a plugin out there that has not been updated. It would be based on single file to modify different template instead theme. Is it possible for you to have another plugin for template based on category instead I have to copy the whole theme and redesign one page of header to make it look differently. I just dont want the different theme but template, yes…
May 6th, 2008 at 12:32 am
Hi Mike… interesting plugin you got there.
Is there a plugin that allows me to choose what to display on the sidebar, for both pages and posts? Like say, for posts I want to show only recent posts or other posts on the sidebar, but on a page, I want to display just categories and no recent posts.
Thanks,
Roy
May 6th, 2008 at 1:39 pm
Thanks Roy. As for what you want, I don’t know of any such plugin yet but that sounds interesting.
Mike
May 14th, 2008 at 11:53 am
Well you guys…if you wonder if the plugin works for WP2.5. It really does. I installed it and use it on my website. But its not actually what I looked for – I was searching for a plugin that can change the header per category. For now I will use it. This plugin rocks – I love it. Thanx man – thumbs up from south-america.
May 29th, 2008 at 2:54 am
thanks.
May 30th, 2008 at 2:15 am
I installed this plugin on one of my blogs — 1459pm.com and none of the pages would load. It would just sit there an spin. Anyone else see this issue before? WP 2.5.1.
June 4th, 2008 at 6:18 pm
Hi Mike,
I have just installed your plugin on Wordpress 2.5 but the dropdown is not appearing.
I have done some checking and the problem seems to be the following javascript error on the edit category page:-
error: ‘document.forms[0].tc_cat_theme.options’ is null or not an object.
June 4th, 2008 at 6:20 pm
Hi Mike,
I have just installed your plugin on Wordpress 2.5 but the dropdown is not appearing.
I have done some checking and the problem seems to be the following javascript error on the edit category page:-
error: ‘document.forms[0].tc_cat_theme.options’ is null or not an object.
Any advice would be greatly appreciated.
Best regards,
Michael
June 4th, 2008 at 9:41 pm
Hi again Mike,
Some of my comment went missing when I submitted it.
The full error was:-
message: Statement on line 15: Could not convert undefined or null to object document.forms[0].tc_cat_theme.options[0] = new Option(” (global)”, ” (none)”);
Hope this submits ok.
Best regards,
Michael
June 25th, 2008 at 5:58 am
awesome plugin thank you
July 17th, 2008 at 11:13 am
Hello, Mike!
Your plugin was just what I was looking for!
I’ve downloaded it and inslalled (version 1.2), but it didn’t work..
I’ve edited the desired category and chose the appropriate theme for it, but nothing happened when I opened it…
When I tried editing it again, to see if I did something wrong, I noticed that the selected category was “global”…
It doesn’t matter how many times I try, it always goes back to “global”.
I’m using wordpress 2.5, running on my computer.
Could you please help me??
Thank you very much!!!!
July 17th, 2008 at 12:16 pm
Hi Bernardo,
Does the plugin or PHP show any error?
Mike
July 18th, 2008 at 4:20 am
Hello, Mike!
the error log says:
WordPress database error Tabela ‘tzdz.wp_themed_categories’ doesn’t exist for query SELECT cat_theme FROM wp_themed_categories WHERE cat_ID = 6; made by tc_set_template
I’ve tried to re-install wordpress, re-install the plugin, but the error keeps happening.
Is it possible to configure the tables manually?
Apparently the tables weren’t created when I installed the plugin, for some unknown reason…
thank you very much!
Benardo
July 18th, 2008 at 4:53 am
I’ve managed to solve the problem!
I’ve commented the lines about checking “user level” on the plugin file, re-installed it and now the tables were created and the plugin is working fine!!!
thank you very much!!!! : )
July 18th, 2008 at 5:04 am
Hi,
Nice to know you got it working.
Mike
July 31st, 2008 at 5:05 am
Hi there, installed the plugin successfully on Wordpress 2.6 but there is no dropdown appearing, and no error message. Can you help?
August 9th, 2008 at 11:58 pm
This plugin is exactly what I am looking for, but it does not seem to work with Wordpress 2.6. Any chance this will be fixed in the near future?
August 10th, 2008 at 9:08 pm
Hi
This plugin is a lifesaver for me, but I cannot get the drop down menu to show in the admin area.
The table has been created in the DB with zero rows, and if I view source, the script of inner html is shown at the bottom, after the admin footer.
This is of such importance for me I’d be happy to sponsor the tweaking of it to wrok with wp 2.6.
Are you still developing this plugin?
August 11th, 2008 at 3:41 am
Hi Mike,
I love yr plugin and work perfectly but Page are not working (404 error) anymore with “wp-magazine” theme.
Could you please find out the problem why?
I’m dying to use yr plugin with that theme.
Thanks in advance
August 11th, 2008 at 9:57 am
Hi Paul,
I only have very little time in my hands at the moment to fix the bugs. Feel free to tweak it so that it works with Wordpress 2.6
Thanks!
Mike
August 25th, 2008 at 3:32 am
Hi there,
I used this plug-in in older version of wordpress. Sadly it isn’t wotking in 2.6.. I already read I’m not the only one. Can we expect an update soon? Or is there an alternative?
Thanks a lot for any help.
- Pim
August 25th, 2008 at 10:17 am
Hi Pim,
Sorry, haven’t found the time to fix it yet but I will try to do so this weekend. Sorry.
Mike
August 26th, 2008 at 1:24 am
No problem
But it’s just a very good plugin
August 26th, 2008 at 4:01 am
Hi again,
Maybe I’m doing something else wrong. I have installed WP 2.5 and it isn’t working either but it should according to your post. When I hit “Edit Category” I het the message “category saved” but when I go back into the category edit the theme is not there anymore… Any idea?
August 27th, 2008 at 3:37 pm
It will be great to see it worked for WP 2.6.1 however it caused a hang up on server when we tried to access a category for diff theme. It basically froze the server a bit. Any idea?
September 2nd, 2008 at 11:49 pm
Hi, any luck with fix for 2.6 ?
September 13th, 2008 at 2:30 pm
any updates?
October 2nd, 2008 at 8:13 pm
Great plugin. Works fine for me on 2.6
However, is this situation possible?
I have categories that I want different themes for. For each particular theme I want that particular subcategory to only show the subcategories, and not all of them?
October 24th, 2008 at 1:33 pm
anyone found a fix for this plugin yet>
November 4th, 2008 at 8:20 am
I can’t get this plugin to work properly. The drop down menu doesn’t show up in IE at all when I’m editing the category. The drop down menu does show in Firefox, but when I save the changes after selecting a theme it doesn’t actually save the changes. Is anyone else experiencing the same issue. BTW I’m using WP 2.6.2
November 13th, 2008 at 11:44 am
It doesn’t work. The drop down menu doesn’t appear in IE or Opera. it shows in firefox but as soon as i assign themes for the categories everything stops working until i delete the plugin
November 16th, 2008 at 8:03 pm
To all those who gave Wordpress Themed Categories a try and ended up being disappointed, I have a good news. I rewrote the plugin and it now works perfectly in Wordpress 2.6. There is however a caveat, I wasn’t able to test it on lower versions.
The new plugin is called GYS Themed Categories 2.0. I placed it on my new “downloads” blog. Get it at http://get-your-stuff.com/gys-themed-categories-20.html
Just Wordpress Themed Categories and replaced it with GYS Themed Categories 2.0.
Cheers!
December 31st, 2008 at 4:15 am
wordpress 2.7 not worked
June 4th, 2009 at 5:25 am
works great on 2.7.1 !
June 5th, 2009 at 10:33 am
http://www.casualgenius.com has a plug-in for subdomains and the themes.
I am on the hunt for a solution to get the sub-categories working on sub-domains. It currently shows up as a 404 page.
June 15th, 2009 at 4:49 am
Thanks for the plugin. I´ve using it with wordpress 2.7.
But updated to 2.8 and the plugin dont work