Entries
RSS 2.0

Category Subdomains Plugin for Wordpress 2.5

The last few weeks I have been looking for a plugin for Wordpress which would let me use subdomains of the site as a category, eg

http://goldfish.ilikefish.com

Which would list all the posts in the goldfish category.

I went off on a Google search and I found an old plugin called Subster Rejunevation, but it hadn’t been updated for a while and although someone else had modified it to work for Wordpress 2.3.x, I still couldn’t get it to work.

I decided to have a look through the code to see if I could get it working for Wordpress 2.5, not thinking I would have much luck, but a few hours later and I seem to have it working!

Obviously I haven’t done the majority of the work on this plugin, I have just modified it to work with the latest version, but the original author has said he doesn’t support it anymore so I thought I’d release it and change the name too just so that more people are likely to find it when trying to search for something to do the job.

So here it is: Download Category Subdomains Plugin for Wordpress 2.5

It will now only work for Wordpress 2.5, not any earlier versions, but that shouldn’t be a problem for anyone. If it doesn’t work for you or you find any problems, let me know and I’ll see what I can do :-)


       Random Posts

66 comments so far

hrbrt April 18, 2008 7:05 am

First of all, thank you for the good work.

I have a problem with pages to subdomains. I used ’subdomain_me’ set to true, but the subdomain does not work on pages(WP 2.5).

In the old version(0.34 and WP 2.0.5) this was working on my website. I tried getting the new 0.38 version working on WP 2.3.3 but no success.

Further I would like to be able to switch off the automatic redirect to the subdomain when you click a link in the blog, but the sub-domain should still keep working if you type it in the browser. Is that possible and how?

Hope you can help me out… :D

[Reply]

Dempsey April 18, 2008 7:53 am

Thanks :-)

Ah I didn’t look at the pages code at all, I’ll try have a look this weekend.

I was just trying to see if I could get this plugin working for my own use and then thought I’d release it afterwards, which is why not everything may be fully working as it used to atm.

Do you mean so it’s not like

http://goldfish.ilikefish.com/my-post-about-fish

but should use

http://ilikefish.com/my-post-about-fish

Instead and only use subdomains when listing categories? If so I’ll try adding an option for that :-)

[Reply]

hrbrt April 18, 2008 11:40 am

The old plugin I am using doesnot redirect automatic. I like that. So if I click on http://www.domain.com/cat1/postname/ it will go to this url as it is written here… so it does not redirect to cat1.domain.com/postname/. But however the page can also be found by using the subdomain url.

I hope you can figure out what I mean… ;-)

Looking forward to the update.

Thanks.

[Reply]

Dempsey April 18, 2008 1:53 pm

Well it shouldn’t be able to be found using http://www.domain.com/cat1/postname/ and http://cat1.domain.com/postname/ as that would cause duplicate content problems in search engines which isn’t good, that’s why it redirects

[Reply]

hrbrt April 20, 2008 5:56 am

Yes, that is true. It is more important that the pages get subdomained too… ;-)

[Reply]

Not John Chow April 21, 2008 6:17 pm

I am not following the conversation very well but, I do have a question: Can I use this plugin to have a page tab on one blog point to a different blog? Or in other words, I would like to have a blog that has sub domains or other blogs as page links.

[Reply]

hrbrt April 23, 2008 7:38 am

I am anxiously awaiting the update of the plugin. Any news on when the ’subdomains from pages’ functionality will be working. Thanks.

[Reply]

Dempsey April 23, 2008 8:18 am

I haven’t had time to have a proper look yet, too busy with other projects, will try having a look as soon as I can :-)

[Reply]

Dempsey April 23, 2008 8:39 am

Not John Chow - not sure exactly I understand what you mean but I don’t think so no, this just lets you use categories from the same blog as subdomains.

[Reply]

hrbrt April 23, 2008 9:12 pm

@Not John Chow->If you want customizable menu links you can try and use sticky menus (http://tela-web.com/wordpress-plugins/sticky-menu/). Have fun!

[Reply]

Dempsey April 24, 2008 9:41 am

I’ve just tested and pages to subdomains is working for me, the only issue is that it currentley doesn’t redirect from blog.com/page-name to page-name.blog.com, which I will fix.

[Reply]

hrbrt April 24, 2008 5:28 pm

Ok, good work. I will wait for the complete update before testing it…

[Reply]

Andreas April 26, 2008 10:22 pm

Hello, from Vienna,

Is it possible or does anyone have experience in using this plugin in a subdomain. What I mean is, would it be possible to have a blog unter blog.ilikefish.com und than have the categories like http://goldfish.blog.ilikefisch.com ?

[Reply]

Andreas April 26, 2008 10:26 pm

sorry, I forgot to say:

Thank you ;-)

kind regards from Vienna

Andy.

[Reply]

Vaugn April 27, 2008 11:57 pm

I’m a little confused…

Can someone please take a look at the following url and give me an idea what is wrong? I can’t figure out how to use this plugin.

http://ismbs.com

I just want to thank the author for taking the time to add subdomain functionality to wordpress! Great job!

[Reply]

hrbrt April 28, 2008 2:20 pm

@Vaugn-> Looks to me like the permalink structure is not set correct, because it cannot find http://music.ismbs.com/artists/ and the normal structure http://ismbs.com/music/artists/ doesn’t work also.
Can you get it working if you switch off the subdomain plugin?

[Reply]

Dempsey April 28, 2008 3:03 pm

@Andreas - I have not tested it, but I’m fairly sure it wouldn’t work the way the plugin is currently coded, I will look into adding support for that :-)

@Vaugn, I think you may have to have your permalink structure set to /%postname%/

[Reply]

Vaughn April 28, 2008 8:14 pm

Thank you, Dempsey! That did the trick. One little something I noticed is that sub-category links are being written out as:

mainCategory.myDomain.com/subCategory (this isn’t working)

whereas if I type the following into the address bar, it works just fine:

subCategory.myDomain.com

Any idea why this may be the case?

[Reply]

Dempsey April 28, 2008 8:42 pm

Yea that is the issue I am currently working on, hopefully I will have a fix for it soon :-)

[Reply]

Dempsey May 28, 2008 2:27 pm

Just to update any people that have subscribed to updates, the plugin has been updated and now lists posts in sub-categories :-)

[Reply]

Andreas June 3, 2008 9:00 pm

hello,

As I already said cool plugin. Maybe someone encounter the same problem: Everything works fine but as soon as I save Tags with the posting (wordpress-built-in or with Simple Tags) via editing or initial publishing, the posting “loses” its subdomain and changes from subdomain.domain.tld/postname/ to http://www.domain.tld/postname/. Hmm …

[Reply]

Dempsey June 6, 2008 9:13 am

Andreas - Thanks for pointing that out, seems a weird problem but I’ll take a look :-)

[Reply]

Dempsey June 14, 2008 10:06 am

The plugin has been updated to 0.4.3 and now works on posts with tags!

[Reply]

[...] Category Subdomains Plugin for Wordpress 2.5 | demp.se/y - Adam Dempseys Blog This is a plugin that turns WP categories into subdomains. [...]

wanda July 24, 2008 8:58 pm

this don’t work for me :( tags or posts gives 404 and subdomain.4addicteds.com redirect to 4addicteds.com// , yes with 2 slashes .

[Reply]

wanda July 24, 2008 9:28 pm

i got read of the second slash, but all posts category.4addicteds.com/post are 404 errors… :( and the tags too.

[Reply]

wanda July 24, 2008 9:53 pm

It started working right now, sorry for my dumb comments. Seems it took some time for DNS to propagate in servers(as my hosting support said).

However i don’t use categories. How can i change this to work for tags?

[Reply]

wanda July 25, 2008 11:34 am

BTW, how do i change this plugin to work for tags?

[Reply]

Dempsey reply on July 30th, 2008 8:53 am:

To work completly with tags instead of categories? Isn’t the general idea of tags that you can use multiple tags and categories you tend to just use one?

[Reply]

wanda reply on July 30th, 2008 4:19 pm:

but it transform only categories in subdomains. and i have already working with tags. so i need this to work for tags :( please ?

[Reply]

Barry Bell July 28, 2008 9:51 am

Hi - I’ve been using a variation of this plugin for a few years now and am hoping to use it again for a wordpress project I’m revitalising.

My problem is that I want the login information to be persistant across subdomains - ie, the wordpress cookie should be shared whichever subdomain you’re on. This used to work fine pre-WP2.5 but it’s now borked.

I believe it will take a re-jigging of both the `sd_wp_login()` and `sd_wp-logout()` functions and I’m just wondering if you’ve looked at doing this yet?

Cheers

B

[Reply]

Dempsey reply on July 30th, 2008 8:56 am:

I haven’t had a look yet no, I will upgrade my test blog to 2.6 and see if I can get it working :-)

[Reply]

Dawid July 29, 2008 7:15 am

Hello.

I have a problem, because WP pinging url: domain.com/category/catname.

I think it should ping url catname.domain.com
Don’t u think?

Its problem because google indexes articles with wrong url…

Can u fix it or tell how fix it?

[Reply]

Dempsey reply on July 30th, 2008 9:07 am:

Ah yea, I’ll look into that, should be able to hook onto that and change it :)

[Reply]

wanda August 1, 2008 10:15 am

I already have thousands of posts and tens of tags. i can’t change all to categories. how can i make the plugin to work for tags ? please …

[Reply]

Adam Dempsey reply on August 1st, 2008 1:54 pm:

I’ll try add an option to use tags instead of categories soon, my birthday tomorrow though so won’t happen for few days at least.

[Reply]

wanda reply on August 2nd, 2008 11:03 am:

Happy Birthday Adam! ( btw, today is my birthday, no joke :D 2 Aug)

[Reply]

Recep August 2, 2008 9:56 am

again same problem..
same problem occured with WP v2.6..
sub-categories not working again:(

[Reply]

A.B. Dada August 2, 2008 4:08 pm

This is a great plugin, but my webhost does not allow httpd.conf access for any reason.

Has anyone gotten this to work by setting up .htaccess files for each subdomain to redirect to the main domain with the directory? I’m going to try it this week. The thing is, I’d like the redirect to KEEP the subdomain structure when visiting the main domain, which I think may not be possible.

Here’s what I want:

subdomain.domain.com/url.html redirects to domain.com/subdomain/url.html, but the user still sees it as subdomain.domain.com/url.html rather than rewrite the url entirely.

[Reply]

A.B. Dada August 2, 2008 4:10 pm

Whoops forgot to subscribe to email notifications.

[Reply]

A.B. Dada August 2, 2008 4:57 pm

Update:

I did NOT have to do anything funky with htaccess. Instead, I just set up DNS aliases on the host end, and it works GREAT. Very, very happy.

The only thing now I wish I could do is change the “title” of each subdomain to the new title of that category instead of having the main blog title for each.

Thanks for this plugin, it’s fantastic!

[Reply]

wanda reply on August 3rd, 2008 9:08 pm:

its not about this plugin, its about query. just google it!

[Reply]

Alan Who August 5, 2008 11:30 pm

Hi

I can’t seem to toggle the “make category” subdomain option in wordpress 2.6.

Is it just me or is it broken in Wordpress 2.6?

[Reply]

A.B. Dada August 6, 2008 3:12 pm

Found a bug that I haven’t been able to find a solution to via Google…

On my primary domain, if you click on a link that takes you to a subdomain via this plug-in, the “Older Posts” button doesn’t work. Example:

GO to http://finances.unanimocracy.com/

Scroll to the bottom, and look at the link for “Older Entries”. This link goes to http://www.unanimocracy.com/page/2/ which ends up in some sort of recursive loop and no page shows. I’d assume it SHOULD go to http://finances.unanimocracy.com/page/2/ but that doesn’t work, either. Is this the “feature” that people are asking for regarding “support pages” or have I done somethnig wrong?

[Reply]

Dawid August 6, 2008 4:33 pm

Yes it’s bug. I have the same problem.

Hey… dempsey when will be a new version with fixed this bugs?

[Reply]

Brad Traynham August 13, 2008 4:56 am

Oh, I was so sad when I saw the original author quit working on this plugin, and then something magical happened you started working on it! YEAH!!!! I’m planning on installing it this weekend. Hope it works well enough for my uses. Keep up the good work!

-Brad

[Reply]

Dempsey reply on August 20th, 2008 8:36 am:

Hope it works out for you :D

[Reply]

GiladG August 20, 2008 2:18 am

Was wondering, how would I make a page into a subdomain? Didn’t see a checkbox or anything (running 2.6).

Also, looks like ‘Make Subdomain’ checkbox no longer works in 2.6 and all categories are “subdomained” by default.

[Reply]

Dempsey reply on August 20th, 2008 8:40 am:

From the Plugin source:

To make pages act as subdomains set a custom field with the key of subdomain_me to “true”

Ah, yea that may be broken atm, I tried switching it to a checkbox for not making it a subdomain, will try to fix in next release :-)

[Reply]

GiladG reply on August 20th, 2008 3:08 pm:

Thanks!

I added the custom field but now I get the following permalink: http://page1.mysite.com/page1 or http://page1.mysite.com/page1/sonOfPage1

Did I do it wrong?

[Reply]

Will August 23, 2008 5:57 am

I’ve been trying this out — I’m running WP2.5 and my host, Bluehost, seems to reject the fact that it’s creating a subdomain and claims that “there is nothing on this page yet!”

Anyone know if this can be fixed?

Cheers,
Will

[Reply]

Will August 23, 2008 6:08 am

A follow up to my previous comment, I now just get a 404 error.

[Reply]

Kitchenware UK August 26, 2008 7:41 am

A.B. Dada, how did you set up DNS alias?

Like you, I do not have access to the httpd.conf file. I’ve installed this plugin but every category and page that I clicked on pointed to 404 error. But the address bar did show the name of the category.

[Reply]

I am using wordpress 2.5 but the sub categories are not working

[Reply]

I got subcategories working but when i go to archive I get this

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Check out my site http://www.couponcodesbox.com

[Reply]

Doug reply on September 12th, 2008 5:55 am:

Coupon Codes,

What are you doing to get this to work? I am getting some weird stuff in WP 2.6.2 on a site. You seem to have this thing working. BTW, in Firefox Mac it seems to be working correctly.

[Reply]

Web Hosting Coupon Codes reply on September 19th, 2008 2:46 am:

The truth is I’m using worpdress 2.2.2. Seems like the only version that works with this plugin.

[Reply]

Kree September 11, 2008 10:29 am

Will that problem GiladG mentioned be fixed any time soon? This is a great plugin but I don’t want to make every one of my categories into a subdomain, I just want to make a single page into a subdomain.

[Reply]

Doug September 12, 2008 5:57 am

I should read the replies better. I see Coupon Codes is using version 2.5. Sorry about that. So the question is when will the plugin be updated for 2.6+ Any ideas? Thanks!

[Reply]

[...] dominio diferente al principal dónde se generaban. Existe un plugin para wordpress llamado category subdomains que permite acceder virtualmente a las categorías a través de subdominios que crea [...]

Bis September 18, 2008 4:26 am

I can’t get it to work with TAGS and posts

GO to http://www.for-mac.cc/automatic-form-filler-for-mac-os-x.html

Scroll to the bottom, and look at the link for “Tagsâ€. Th tag links can’t be accessed.

and you can see that only the category has made to subdomain , the posts are not.

Please help
Thanks

[Reply]

If possible everyone should use wordpress version 2.2.2 because it seems to work fine

[Reply]

[...] Adam Dempsey took a stab at adapting it for Wordpress 2.5, however, according to the comments the plugin did not work properly beyond Wordpress version [...]

GiladG September 20, 2008 11:57 pm

For all of those who have been struggling with this plugin, I released an fixed version that addressed the following issues:
1. Plugin not working in WP2.6
2. Pages not being subdomained
3. Admin pages not working properly

Check: http://blog.youontop.com/wordpress/wordpress-category-as-subdomain-plugin-41.html

Good luck and please comment with any troubles you run into.

[Reply]

Alex Stansfield November 7, 2008 9:56 am

If anyone is interested I basically rewrote this plugin and added some more features and some bug fixes.

It is available from my website here:
http://webdev.casualgenius.com/projects/category-subdomains/

or from it’s launchpad page here:
https://launchpad.net/wordpress-csd/

It is being actively developed and I welcome bug reports and feature requests.

[Reply]

MaoJieming November 22, 2008 7:47 pm

First , Thank you and thank you for your plugin.

Now I want to ask if you will update the plugin to WordPress 2.7。

Mostly I make Wordpress as a CMS. SO this plugin is very useful.

[Reply]

Leave a comment


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser