It’s doable with a user agent string “sniffer”. Take a look at this project: http://mobiledetect.net
Mind you, this approach can be troublesome as most modern browsers can ‘fake’ their user agent strings. Also, this approach doesn’t work to well with caching systems.
I’ve implemented it successfully on a project I worked on, and I know it’s possible but it has some caveats. If you’re willing to overlook those small problems, I personally think this is the way to go (at least until WordPress gives us the proper tools to create better [and faster] websites).
Related Posts:
- Using classes instead of global functions in functions.php
- How to insert a logo in the header?
- Page template in two level deep folder
- Template for individual post designs
- How can I get wp_head() as a string instead of echoing it?
- Front End Post Submit Form
- Returning Variables back into a template
- Upgrading a custom theme through the Dashboard
- Theme Customizer not loading
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Version control for both Vagrant config and themes being developed [closed]
- How to correctly add JQuery in a WP theme?
- What is the best way to handle multiple calls to get_template_directory_uri() and similar functions?
- How to add a second stylesheet to the editor
- WP 3.1 upgrade breaks AutoFocus+ theme
- create-guten-block in wordpress theme?
- Override template file i subfolders
- Single Page theme [closed]
- How to make theme elements customizable in wordpress?
- Limitations when modifying wp_title with a filter
- How to edit theme functions file to modify pagination?
- Customizer: save setting/control content to post/page
- Move default page templates to sub directory
- Customize how a WordPress theme looks like in the Theme Selector
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Integrate WooCommerce theme with a WordPress theme [closed]
- Widget Option is Missing
- How do you use WordPress for a website that’s not in a blog format?
- How do I get the trackback count of a post in wordpress without writing an SQL query?
- Template for landing pages
- How to add menù section to my WordPress template?
- Why still output /wp-content/themes/twentynineteen?
- searchform.php doesn’t work properly
- Customizer: get_preview_url() inside customize_save_after hook
- How to add custom meta box when you have a custom page template file
- New to WordPress – Read the Codex, Other Docs; Still Confused
- How to add custom page elements to the WYSIWYG editor?
- Can’t change theme name
- How to hide custom sidebar on mobile
- Change Image Sizes for Mobile Theme
- Is hand coding required at all?
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- How to dowload and edit content of a website
- Any way to permanently translate themes?
- How to prevent XSS attack in wordpress theme?
- Show posts from all categories
- Best strategy for providing theme options using customizer
- How Does One Create a Global Variable Repository
- How to convert that page to a wordpress template? [closed]
- Turning WordPress Into full-featured website?
- Best practice to create required pages
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- What is the point of using the front-page.php template? [closed]
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- Theme Inspector “X-Ray”
- Using My Own Classes On Wp Unit Tests
- Migrated WordPress site renders Chinese
- Acivate all themes multisite wide automatically
- Echo all category names, apart from one
- How to enqueue javascript for WP Customize options sidebar?
- Is it possible to visually group items on the theme customizer?
- WordPress 500 Internal server error when activating custom theme [closed]
- Migrating a taxonomy’s tags to the native category
- Call to undefined function add_menu_page() on theme activation
- How to Find the Page the Front Page is Using?
- How to place HTML tags in content from the_content()?
- correct tags for validating input types
- WordPress Theme Creation [closed]
- Custom Blocks as part of a theme
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- WooCommerce: multiple input field for multiple product variations
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- How to use get_template part in the plugin?
- How to set a page as homepage in stead of the newspages?
- Where to place template files?
- Renaming a theme so it aids SEO and the theme used is hidden
- Admin: sub menu doesnt display under apperance when activate my themes
- Automated Footer information
- how to get the post attachement image in full size?
- Is there any tool to find lines of codes responsible to generate front-end HTML elements?
- Overrite parent functions using child functions
- Load sidebar template just once to prevent multiple animations
- Default Text not showing from customizer
- Best way to develop a new theme on a live site, with new content? [closed]
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- How do I make the most minimal vanilla theme possible with nothing but raw content?
- Can I Set Up Session in WordPress Custom Page
- Does code in function.php differ from theme to theme
- WordPress 3.8 Backend Admin Color Scheme add more scheme how to do?
- Is it acceptable for a WordPress theme to not accept widgets?
- WordPress Theme Validator?
- Should all references to a text domain be to my current theme?
- Theme thumbnail in dashboard
- Replace single_template filter with what for default posts?
- If you were to start using a WordPress framework today, which one would you use? [closed]
- How to have content scroll over background
- 3 Level Deep Navigation Menu Not Showing All Levels
- Need help with adding templates (archives and sitemap) to WordPress child theme
- WordPress Template Part in iFrame
- How can I change the theme of different posts using a plugin?