Support » Fixing WordPress » Auto switch to mobile theme

  • Resolved Beatboxx

    (@beatboxx)


    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Bartel

    (@andrew-bartel)

    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

    (@beatboxx)

    Isn’t there a better option? Is this option not a seo-killer?

    Beatboxx

    (@beatboxx)

    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

    (@beatboxx)

    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”

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Auto switch to mobile theme’ is closed to new replies.