Beatboxx
Member
Posted 5 months ago #
Hi,
I have a wordpress website, and I want my mobile visitors to view a different version of the website than my desktop visitors. I made two themes, one that I want to show to my desktop visitors and one that I want to show to my mobile visitors. I have tried to do this with the switch_theme(); function, but that function just changes the theme until you change it, not for just that visit. I also want to be able to add pages with custom templates to both of them, and I want to be able to change their sidebars. Can anyone tell me how to do this?
Andrew Bartel
Member
Posted 5 months ago #
I believe you'd need to set up a subdomain, ex. m.mysite.com instead of mysite.com and use a separate WordPress installation, although you get reference the same database.
Beatboxx
Member
Posted 5 months ago #
Isn't there a better option? Is this option not a seo-killer?
Beatboxx
Member
Posted 5 months ago #
Your idea doesn't work for me I guess. I have set up two wordpress themes, one on m.mydomain.com and the main on mydomain.com. If I go to m.mydomain.com, the mobile theme does show up, but then if I click a link, I directly get redirected to the main site again. Anyone?
Beatboxx
Member
Posted 5 months ago #
It works! I have used this blog post: http://www.blogtips.org/how-to-enable-mobile-theme-on-wordpress-blog/
In short, install the plugin "WP Mobile detector"