WordPress.org

Ready to get started?Download WordPress

Forums

WP Mobile Detector Mobile Plugin
[Plugin: WP Mobile Detector] The plugin doesn't works (3 posts)

  1. nomeecognome@gmail.com
    Member
    Posted 2 years ago #

    I have the last version of WP, and the last of wp-mobile-detector.
    I have a main theme and after a child theme the overwite only 2-3 function.
    When i try to select the child theme from the list, the plugin always load the main theme.
    How to fix the problem?
    Have you an idea of where is the problem?

    http://wordpress.org/extend/plugins/wp-mobile-detector/

  2. websitezcom
    Member
    Plugin Author

    Posted 2 years ago #

    What folder is the child theme located in?

    Can you give me the full directory path?

  3. joshkadis
    Member
    Posted 2 years ago #

    I'm having the same issue with not being able to select child themes. It looks like the problem is caused by relying on the "template" attribute of the theme instead of the theme name - which is problematic because a child theme has the same template as its parent. For instance, line 159 of md-admin/functions.php

    <option name="theme_template" value="<?php echo $mobile_theme['Template']; ?>" <?php if($mobilemeta->theme_template==$mobile_theme['Template']) echo 'selected="selected"'; ?>><?php _e($name); ?></option>

    Setting the value to $mobile_theme['Template'] means that a parent theme and its children will have the same value in the dropdown menu.

    I think the solution is to separate template and stylesheet, this is why WordPress has separate values for these in the wp_options table.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic