Support » Plugin: Theme My Login » TML disables admin toolbar on profile save

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same thing happening here! I’m currently disabling for subscriber users with show_admin_bar( false ), and allowing the toolbar to show only to an administrator profile. When I update an administrator profile, It updates show_admin_bar_front meta field to false, disabling the admin toolbar.

    To “hack” this behavior and keep show the admin toolbar, we could add this line to my theme-my-login-functions.php:

    add_filter( 'show_admin_bar', '__return_true' );

    This shows the admin toolbar for every single user. In my case, for example, I check if the current user is an administrator and then, return true. This solves the issue for now, but I think that this “bad behavior” should be fixed.

    We are about to go live with a new site using this plugin and we lost the admin bar after updating a test user profile also. We also can’t see the button to enable admin bar…….

    I will try the hack.

    Also using 6.3.9

    OK. In 6.3.9, there is no theme-my-login-functions.php. I found the line you were referring to in the themed-profiles.php module.

    I added the line add_filter( ‘show_admin_bar’, ‘__return_true’ ); after commenting out the line that was there.

    Didn’t solve the problem.

    Actually, I just fixed the problem. Here’s how to do it:

    1. Edit the theme-my-login.php file.

    2. Search for add_filter( ‘show_admin_bar’

    3. Comment out the existing line.

    4. Add this line: add_filter( ‘show_admin_bar’, ‘__return_true’ );

    5. DEACTIVATE THE PLUGIN.

    6. Re-activate the plugin.

    Hi, @nyghtfalcon,

    It’s good that you could solve it, but you’re editing a core file of the plugin, and it isn’t a good pratice, because when you update the plugin to a new version, you’ll lose your changes.

    About the theme-my-login-functions.php file, it doesn’t come with the plugin. It’s just a file that you can create to store custom code for it. Check it out the documentation: http://www.jfarthing.com/development/theme-my-login/using-theme-my-login-custom-php/.

    You can create the file with any code that you want, then store it in your plugins directory. Try to do that and check if it works!

    Thank you.

    Also, the correct file name – the one I modified originally – is themed-profiles.php.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘TML disables admin toolbar on profile save’ is closed to new replies.