In some cases, we need to create other website using the same database for conditionally purposes. Let says, we do have www.domain.com, but we also need a different spesific site for Facebook Page fb.domain.com. Or you might need touch site (with swipe capabilty), like touch.domain.com.
After googling, here’s the tricks I found. 🙂
- Create a new WordPress site with subdomain (eg: fb.domain.com)
- Copy wp-config.php from main website to your subdomain site, and add this
define('WP_HOME','http://fb.domain.com');This will forced this new site to keep the domain as fb.domain.com.
- Now, how to make this new site use spesific template. Add this to your functions.php
// return the name of theme (theme directory name)
Now you have another spesific site, but still using the same database.
Oops, before I forgot… You also need to add meta tag ‘noindex, nofollow’ in your header, to avoid duplicate content in term of SEO. 🙂