I created two WordPress themes.

First for the Desktop and second for tablet/mobile. I want to set on one URL. When the website opens, the theme should change automatically based on resolution.

2 Answers
2

To employ two entirely separate themes is a suboptimal architectural approach.
Themes are activated site-wide/globally and not on a per-user basis. You don’t want to change the current theme constantly.

While I personally really dislike this option, WordPress ships with a function that sniffs the UA-String, wp_is_mobile.
This function can be employed to either output alternative markup and/or load an alternative stylesheet (from within the same theme).

Or – and this is my personal choice – familiarize yourself with CSS3 mediaqueries.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *