Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

Thanks

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

1 Answer 1

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

 
discard

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.