I am building a classifieds website and am using WordPress for the functionality of user accounts, Paypal integration, custom taxonomies and of course super flexible custom post types for the listings.
I would like to be able to map a subdomain to a particular sub-site. For example: australia.somesite.com or brisbane.somesite.com and have it localise the site to that particular region.
Is there a clean-cut way of doing this with WordPress, possible that someone else has surely already done this.
Sort of a vague question, but I think I understand what you’re getting at. You’d need to use a WordPress Multisite installation, which will effectively create localized blogs on a subdomain (brisbane.example.com, perth.example.com).
Using a single site WordPress installation to do this is possible, using CNAME mapping on the domain, however this would not suit your goal as you won’t be able to post within the localized listing.
To achieve the subdomain for category “effect”, with the least amount of effort, you should use Multisite. I hope that answers your question.
A good rundown of getting Multisite going can be found at WPMUDEV. Hope this helps.
The WordPress.org version can be found at:
http://codex.wordpress[DOT]org/Create_A_Network
And this is the last bit of info you’d need to look at:
http://ottopress[DOT]com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/
Cheers!
If mod_rewrite is available in your environment, that would probably be the way to go. To map a subdomain to a certain category in WordPress, a rewrite rule like this could work — put this in a
.htaccess
file in the subdomain’s document root.To adjust the look of an individual category — e.g. adding a localized logo and text — you can create a custom template such as
category-brisbane.php
in your theme.Please Note: This will only redirect the subdomain’s root to the category page. If you wish to make more than just the category archive accessible via the subdomain (single pages, search, front page, etc.), a WordPress multiuser installation might be more appropriate.