WordPress.org

Ready to get started?Download WordPress

Forums

Device Theme Switcher
[resolved] Mobile theme merging with Desktop theme (5 posts)

  1. sgauder
    Member
    Posted 2 years ago #

    I've tried just about every theme switcher plugin out there and seem to be encountering the same issue.

    The mobile theme I'm trying to set up is a pared down version of the desktop theme - I'm not including all the pages or functionality of the desktop site. However, the theme switcher appears to work - the mobile theme I select gets loaded - but the header and footer still have the desktop file references for scripts, stylesheets etc that I'm not including in the mobile theme.

    Should I expect that this theme switcher will load header.php from both the desktop and mobile themes? Am I misunderstanding how these plugins are supposed to work?

    http://wordpress.org/extend/plugins/device-theme-switcher/

  2. James Mehorter
    Member
    Plugin Author

    Posted 2 years ago #

    Hi sgauder,

    It all depends on how you code your mobile theme. When making a child theme keep in mind the child theme uses all the code from the parent theme. All you need for a child theme is the style.css file. So if you want to use a different header.php you need to make one for the child theme-so it overwrites the parent theme's header.php. I would recommend you read up on how to correctly create your child theme. http://codex.wordpress.org/Child_Themes

    Lastly, while building your child theme simply activate it as your default theme, so you can work on it in your browser, on your computer. Once you're happy with your child/mobile theme, go back and set your desktop theme as the default theme and set your new child theme as the mobile theme in the Device Theme Switcher (DTS) settings. DTS simply delivers the theme to mobile users-nothing more.

    Post back if you hav any more questions!

  3. sgauder
    Member
    Posted 2 years ago #

    Hmm, maybe that's where I went wrong. I've not built it as a child theme but as a separate theme. However, the mobile theme has it's own header, style sheet, etc. Wouldn't mind so much but it's loading files that I'm not using in the mobile site - trying to keep load time in check.

  4. James Mehorter
    Member
    Plugin Author

    Posted 2 years ago #

    Oh ok.. well you dont need to use a child theme. You can use a completely separate / custom theme for just the handheld devices. If you want to zip up your themes and email them to me I can take a closer look. jamesmehorter@gmail.com

    As long as your mobile theme follows the WordPress theme guidelines it will work correctly. http://codex.wordpress.org/Theme_Development

    Your mobile theme can be as simple as a style.css + index.php or it can be super complex with many page templates and such.

    James

  5. sgauder
    Member
    Posted 2 years ago #

    Hi James,

    I've sent the theme files off to the email noted above. Appreciate you taking a look.

    Sandi

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic