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.
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?
Just wrap you code up in a conditional:
global $is_iphone;
will triggerTRUE
for all mobile devices incl. tablets.Edit for WP 3.4+
Now there’s
wp_is_mobile()
to make checks forUser-Agent
. It’s basically a wrapper for$is_iphone
and does the same.