Try:
add_filter('template', 'change_theme');
add_filter('option_template', 'change_theme');
add_filter('option_stylesheet', 'change_theme');
function change_theme($theme) {
if ( wp_is_mobile() ) {
$theme="SelectThemeMobile";
}
$page = get_page_by_title( 'Title for 145' )
if ( is_page($page->ID) and wp_is_mobile())
$theme="SelectThemeOne";
// Replace name below with hook for missing stylesheet
wp_enqueue_style( 'registered name of missing mobile stylesheet');
}
return $theme;
}
I believe you must iterate the entire array of Pages in order to evaluate is_page()
.
Related Posts:
- Load a theme based on browser detection
- Switch to other theme at URL
- Use a different template/theme if mobile only on home page
- How to set different settings for a mobile theme?
- How Do I Use A Custom Mobile Theme?
- Mobile issue – website isn’t properly detecting screen size [closed]
- Jetpack CSS .screen-reader-text breaks mobile menu [closed]
- Conditional config WP_HOME/WP_SITEURL does not update bloginfo(‘template_url’)?
- Adding a template in WPTouch
- Blackberry mobile theme redirection
- Mobile theme switching problems
- Any Mobile Theme Switcher – Theme not complete (Stylesheet missing)
- How to change background color in the Notepad++ text editor?
- Disable plugin / plugin action via theme
- What are all the available parameters for query_posts?
- Does WordPress work without a theme?
- Is it OK to remove theme credits from footer? [duplicate]
- What theme is good for posting code? [closed]
- Difference between stylesheet_directory and template_directory
- How to see files in directories in “Edit Themes” screen
- WordPress generating 404 on .mp4 file in theme folder
- Why are my widgets not saving when being added to a sidebar?
- Building useful features into your theme
- How to remove “Proudly powered by WordPress” in Twenty Sixteen (2016) theme?
- Editing theme files and access to the Code pages only to super-admin?
- Edit theme wp_head
- Current theme broken – after server and domain migration
- Enqueue different stylesheets using IE conditionals
- Categories for Pages Not Saving in Admin with Custom Categories Metabox?
- Switch Theme Through Options Panel
- Weird post pagination url redirect
- How get Themes list via REST api?
- Activate a new WordPress Theme Only for Admins
- WordPress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]
- How do I copy my Parent Templates to my Child Templates?
- How can I show more than 15 themes at a time in the admin menu?
- What is the WordPress Pinecone sitting on top of? [closed]
- Theme Editor Not Showing
- Pros and cons of using Backbone for WordPress theming [closed]
- Can I create multiple instances of the BuddyPress Activity Stream with separate themes? [closed]
- Can I rename a theme’s folder and still receive updates?
- Child theme not visible
- How to load parent theme style.css?
- How to setup a new WordPress theme without deactivating the current theme?
- WordPress is not able to change themes
- How do I set the featured image size on the single post?
- Where all are child themes recorded when they are created in WordPress
- I have some doubts regarding how to implement child theme
- Inconsistent translation on a WP site
- Incompatible Archive. PCLZIP_ERR_BAD_FORMAT (-10)
- how to remove category nav from Bueno (WordPress Theme) header [closed]
- How can I have different theme with same booking table? [closed]
- Web site Header tag links some resources with HTTPS
- How to style the post previews/links without it affecting the main posts?
- customize color in WP child theme doesn’t saved
- How to work on a new Theme for a site while still keeping the old Theme live
- Loading Bootstrap with wp_enqueue_style and wp_enqueue_script
- WordPress use of @ in core files
- Unable to upload/install any WordPress themes
- Change the name of the root name of an already built WordPress theme
- How to switch theme if the current user is admin?
- Cannot apply custom css to IE in the theme
- Getting a ‘slide down’ js panel implemented within WP
- Why does wordpress add Theme not list a specific theme anymore?
- WordPress theme layout problem
- current_user_can(‘manage_options’) causes white screen of death?
- header.php-tweak: How to do that getting Meta-Slider into the header-center?
- enqueue_script doesn’t work with HTML5 blank theme
- Get WP Install Directory
- How can I add text on top of slideshow? [closed]
- WordPress | Theme error
- Fix threaded comments
- Using DePo Masthead with WP 3+
- How to get this taxonomy name from wp_get_object_terms()?
- Load elements without reload page [closed]
- How to change wordpress gutenberg editor font to match default theme font?
- Facebook Icon on top of WordPress Site Header and Top Bar
- Any way that guest users see the site as registered users?
- Webflow Interactions on WordPress site?
- How to make wordpress theme option page in columns?
- 404 not working, going to homepage; how to fix?
- Local LAMP Stack on Linux Mint theme upload fails
- WP Snippet to Hide Theme Editor In Dashboard Only Works On LocalHost Site
- WordPress 404 on style.css but not on all pages
- How do WordPress themes work in relation to content?
- Custom CSS is overwritten by WordPress?
- Incorrect Theme and Upload URLs After Migration
- Edit box-header on WordPress Dashboard
- Is there significant risk in not keeping a theme updated? [closed]
- Copy from wordpress for dev gives different output in browser
- When translating not all string are present in POedit
- Target Internal Link Of Another Page On Website
- Lost for direction on how to continue building a theme
- How to find out which template the HTML content comes from?
- What is the general cut-off date for reviewed themes in the WordPress.org repository?
- Include root files into header files
- Commenting in CSS (//) equals “none”? [closed]
- What security risk is not having “default” theme?
- Fatal error Class-wp-hook, again, but not sure what’s triggering it
- How to remove pop up on website (css changes not visible)?