Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Setting Alternate Home Page of Mobile Version WordPress

  • SOLVED

I just built http://www.duffresearch.com with WooThemes Suit & Tie, and used Wordpress Mobile Pack to set an alternate mobile theme. I need help with the home page in mobile view. Suit & Tie compiles the home page by aggregating the contents of multiple other pages, and leaves the 'Reading Setting' configured to display "Latest Posts" as the home page, so the mobile version obeys that and displays the latest posts of the blog which isn't what I want.

In my case, there is one discrete page that'd make a make an acceptable home page, i.e. http://www.duffresearch.com/apps so I'm thinking maybe I could auto-redirect mobile users to that page? Any other suggestions?

Thanks in advance,
- Greg

Answers (1)

2010-02-27

Utkarsh Kukreti answers:

If you have the plugin active already, this can be done using the function <em>lite_detection</em> which detects if the user is on a mobile device. I'll try to post in detail soon.

Edit: try this (add to theme functions.php)
function redirect_mobile_users_from_home()
{
if((is_front_page() || is_home()) && lite_detection())
{
echo '<meta http-equiv="refresh" content="0;URL=http://www.duffresearch.com/apps">';
}
}

add_action('wp_head', 'redirect_mobile_users_from_home');