Fix: WPtouch Pro Plugin Breaks WordPress 3.1’s Admin Bar

WordPress 3.1 rolled out today and brought with it several new features, one being the WordPress admin bar. This feature has been previously available to WordPress.com users and is now available to self-hosted sites (like Techerator), and gives logged-in users access to page controls without having to leave the site.

Sites that use the popular WordPress plugin WPtouch or WPtouch Pro will notice that this plugin breaks the new admin bar. While WPtouch is active, the admin bar will not appear on the main site or in the WordPress Dashboard (it took quite a bit of troubleshooting to narrow down which plugin was the culprit!).

The fix is very simple, and the team behind WPtouch has confirmed they are aware of the problem and intend to fix it.

The Fix

This guide requires that you edit plugin files in your WordPress installation. If you do not feel comfortable following this guide, please seek assitance before proceeding. And above all – make a backup!

Step 1: Navigate to the WPtouch plugin themes folder on your web server. Mine was located in /wp-content/plugins/wptouch-pro/themes/classic (If you’re using a different mobile theme, select that instead of classic.)

Step 2: Edit root-functions.php

Step 3: Locate the following code:

[code lang=”php” firstline=”18″]

if ( function_exists( ‘show_admin_bar’ ) ) {
add_filter( ‘show_admin_bar’, ‘__return_false’ );
}

[/code]

And comment it all out:

[code lang=”php” firstline=”18″]

//if ( function_exists( ‘show_admin_bar’ ) ) {
// add_filter( ‘show_admin_bar’, ‘__return_false’ );
//}

[/code]

That’s it! Your WordPress 3.1 admin bar should now be visible on your site. To enable or disable the admin bar, visit your User settings under Users –> Your Profile in WordPress.


Posted

in

,

by

Comments

5 responses to “Fix: WPtouch Pro Plugin Breaks WordPress 3.1’s Admin Bar”

  1. […] will not be able to see the new admin bar. Another culprit could be the WPTouch plugin. There is a fix that requires you to edit theme files. Your other option is to wait until the WPTouch team updates […]

  2. Vardox Avatar
    Vardox

    I cannot find the root-functions.php, in WPtouch, any ideas, where I can find it?

    Thanks!

    1. Evan Wondrasek Avatar

      With standard installations, it should be located in /wp-content/plugins/wptouch-pro/themes/classic/root-functions.php

      1. Vardox Avatar
        Vardox

        Thanks for your help!

  3. Html Pro Avatar

    This is not exist in then latest version of WP.

Leave a Reply