1

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

2

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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