In the profile.php admin page there is a checkbox for the Toolbar: Show Toolbar when viewing site.
I can’t seem to find where this option is stored in the database. I would have thought it would be in the wp_usermeta table … but I don’t see it.
My goal is to set the default value of this to “off” for new users. Then, of course, they would have the option to turn it on if they wanted.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You can update the usermeta upon user registration.
Try adding this to functions.php and then adding a new user:
add_action('user_register', 'update_usermeta_bar', 10, 1);
function update_usermeta_bar($user_id)
{
update_user_meta($user_id, 'show_admin_bar_front', "false");
}
Method 2
In the usermeta table, there is a key called “show_admin_bar_front” Try this query:
SELECT *
FROM wp_usermeta
WHERE meta_key LIKE 'show_admin_bar_front'
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0