• My desktop theme uses a custom static page as the front page. My mobile theme displays the latest posts. I am using Any Mobile theme switcher Pro and have even configured the mobile theme to use the default page as the home page. But still my mobile home page does not show any entries. What can I do?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Hmm, I don’t know how your theme switcher actually works, but as the name implies, it is probably only switching themes, not underlying behavior. I’m guessing the home page selection needs to be the same in both instances since it is the same site in both cases, changing themes really only re-skins the site, content and behavior are the same.

    What you can do is setup your home page template to deal with both situations by using wp_is_mobile() to decide whether to show the static content or to run the “Loop” to show posts. Leave the home page setting the same for both versions, let the template decide what to do.

    There’s nothing magical about wp_is_mobile(), it just tries to match certain user agent strings, it’s not 100% foolproof. It does work correctly for the vast majority of mobiles. For those it doesn’t, the owners likely know they are running something funky and expect to get desktop content once in a while and probably don’t care.

Viewing 1 replies (of 1 total)
  • The topic ‘Different front page for mobile and desktop websites’ is closed to new replies.