• steveb123

    (@steveb123)


    Hi,

    I have the home page using front-page.php which works fine on a desktop.

    For mobile devices I wish the home page to use the default page which works on mobiles.

    Is there a function in WP that would achieve that?

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Will Schmierer

    (@officialwill)

    I’m not sure I fully understand exactly what you’re trying to do, but seems like you might be able to utilize WP is mobile, however I recommend reviewing the notes in this link to make sure it’ll work as you want or look into some of the further recommendations/notes there as well.

    https://codex.wordpress.org/Function_Reference/wp_is_mobile

    Thread Starter steveb123

    (@steveb123)

    I came up with a terrible hack for which I hold my head in shame.

    I created a duplicate of my theme, renamed it theme-mobile, removed the front=page.php template I did not want used, and uploaded the “new” theme to the themes folder. I installed the Multi device Switcher plugin and used that to automatically select the correct theme folder based on the device that is being used to view the site

    It works

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Switching template for mobile users’ is closed to new replies.