How to set different settings for a mobile theme?

My desktop version of wordpress theme requires using a ‘static’ page as the start page as it has custom shortcodes etc.

While this is good, when it comes to my mobile theme, sadly the ‘static’ page is being displayed and because its a different theme, the shortcodes are not being executed.

Read More

Is there a way to tell a mobile theme to display ‘blog posts’ as the default page and not use a ‘static page’ as a starting page for the theme?

Related posts

Leave a Reply

1 comment

  1. 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.