WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a wordpress site say at www.demo.com, now I have two themes one which I want to use this user is acessing the site from "PC" (computer) and a another theme, which is a full fledged mobile theme to be used only when the user is accessing from a mobile device ( such as an android phone, iphone, ipad or tablet).

I did some googling and found that one of the solution is to have two websites like www.demo.com : this will have a theme for users accessing from computers www.m.demo.com : this will have a theme for mobile users

But firstly is it possible to do what I am thinking that have a single site and the theme should change automatically after detecting the user's device.

Please help me out on this, any help/ideas/suggestion/criticism/ any thing will be appreciated.


share|improve this question
Check WPtouch plugin (wordpress.org/extend/plugins/wptouch), maybe it will help. – Eugene Manuilov Jun 9 '12 at 6:50
No, I have a theme [elegantthemes.com/gallery/handheld/] that I have decided to use, so plugins like these and others(mobify, etc) are not workable for me... – Yasser Jun 9 '12 at 6:56
up vote 2 down vote accepted

If you don't mind getting your hands dirty with code you could combine both themes into the same folder. IE: wp-content/themes/yourtheme/secondtheme

Then add the code in the header.php for your primary theme to check if its a mobile site and send the user to wp-content/themes/yourtheme/secondtheme/index.php

Probably a pretty big nightmare.

The proper way of doing this is to code the mobile theme into your theme. These type of themes are called "responsive" meaning they conform to what ever device is viewing them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.