Just wrap you code up in a conditional:
if ( $GLOBALS['is_iphone'] )
{
// do funky stuff for mini screens
}
global $is_iphone; will trigger TRUE for all mobile devices incl. tablets.
Edit for WP 3.4+
Now there’s wp_is_mobile() to make checks for User-Agent. It’s basically a wrapper for $is_iphone and does the same.
Related Posts:
- How Do I Use A Custom Mobile Theme?
- Best practices for a Style/CSS based theme options page?
- How to use media upload on theme option page?
- Add a page outside of the current theme?
- Load a theme based on browser detection
- Switch Theme Through Options Panel
- How to make alert for new version on theme options?
- How to mark an option as selected
- Switch to other theme at URL
- How can I show more than 15 themes at a time in the admin menu?
- How to go about pre generating css file with variables from theme options
- Does uninstalling a WordPress theme delete its database values?
- Cannot find the code for “Edit This” link in posts in a specific theme
- Defining different theme for Blog posts page
- Use a different template/theme if mobile only on home page
- Disable Theme API / Front end (for API only environment)
- What’s the proper way to include inlined javascript-source?
- How to understand a specific bit of WordPress syntax
- Should a child theme share the same theme options row as the parent, or should it have it’s own options row?
- Creating a theme options page
- How can I make some themes usable only by admins?
- Custom options below pages/posts editor?
- Mobile issue – website isn’t properly detecting screen size [closed]
- Redux callback action
- Preserve theme settings when migrating from local to live
- Functions containing parameter ‘yourtheme’
- What is the “pub” theme? [closed]
- Jetpack CSS .screen-reader-text breaks mobile menu [closed]
- Passing dynamic options from backend to frontend
- Color Options from Theme Customizer API not returning via get_theme_mod()
- Issue with theme mod options during domain migration
- .PO file is found but I don’t see translations: how to debug the problem?
- How to add some php code in header.php using plugin
- WordPress activate theme error $pagenow
- Setting a new default template for the creation of a page
- Conditional config WP_HOME/WP_SITEURL does not update bloginfo(‘template_url’)?
- Adding a template in WPTouch
- Cannot update a file for my theme
- Blackberry mobile theme redirection
- List of categories instead of dropdown menu selector in admin options
- Switching among theme customizations
- how to create a section inside a section with theme options customizer
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Mobile theme switching problems
- Plugin to load theme if mobile and specific page
- Any Mobile Theme Switcher – Theme not complete (Stylesheet missing)
- Create /archive page in WordPress Theme
- Church hope them issue
- Link to specific Customizer section
- How do I change the header image height in Twenty Seventeen?
- When cropping a header image, retain meta data (i.e. name, description, etc.) from original image?
- How to create a new theme from scratch?
- How do you change the theme location?
- How do I put my comment form above the comments?
- How can I check for malware in a Theme? [closed]
- Want to have the Post editor remembering the last editing position
- Theme of codinghorror.com
- How to add template to theme in WP
- Download WordPress.com theme: how?
- Custom theme folder
- Can I have two different theme for two different language?
- Switching a Site to WordPress and Leaving It Live Until Ready
- 1 Database for multiple WordPress themes
- Troubles with Walker_Nav_Menu and closing
- style.css not reflecting changes. I have no cache installed
- Permissions for installing themes and files in general?
- Twenty Seventeen search error
- Protect shortcodes, custom JS, and CSS from theme updates
- Recommended Media Size for Twenty Fourteen
- Turn get_posts as string into an array for use in theme admin options
- Free WordPress theme for an intranet tutorial site [closed]
- How do you remove a broken theme from WordPress Admin (without FTP or Cpanel)
- Copying the theme style files and images to duplicate the website but with a difference
- Using Grunt and keeping theme comments
- Why are so many popular responsive WordPress themes “boxed” at 940px? [closed]
- Theme Modified By Updates
- I want to develop a theme using WordPress. Which theme should I start from or develop from scratch? [closed]
- Background image appears on localhost site but not online
- Pages and posts on ElegantTheme featured slider [closed]
- Child theme breaks after update of master theme
- Insert the current theme header into an external HTML/XHTML file
- How to use one git (github) repository for version control for multiple themes
- I’ve got a theme I can’t update and won’t let go
- Make theme settings support multisite enabled (WordPress Mu) site
- Is there any way to modify images from a theme using the web interface?
- how to get json file in wordpress template
- sidebar in 2020 theme as a widget
- Tinymce button is not visible for a theme
- Serve resources from a consistent URL GT Metrix
- Full width background slider
- the_content doesn’t return tags
- Meta title W3C Validation Error with
- Can I add a blog subfolder to my website and use a different theme
- How to modify/ customise NextGen Gallery’s templates? [closed]
- Basic clothing showroom [closed]
- Two types of layout in woocommerce SHOP page [closed]
- How to include a new file in theme
- How to reference or include additional existing variables in the HTML of a 6.0 block theme via Site Editor?
- How can I add a new Styles option in WordPress 2024 theme?
- how to get json file in wordpress template in wordpress