add_action("user_register", "set_user_admin_bar_false_by_default", 10, 1);
function set_user_admin_bar_false_by_default($user_id) {
update_user_meta( $user_id, 'show_admin_bar_front', 'false' );
update_user_meta( $user_id, 'show_admin_bar_admin', 'false' );
}
Place in theme functions file or you can make into a plugin.
Once user registers it will go and set the users admin bar prefs to false. The user can then, once logged in, set this to true.
Related Posts:
- Using classes instead of global functions in functions.php
- When to use esc_url, esc_html, esc_attr, and friends?
- Get password when user registers and save it sha1 into database
- How to add custom template tag in wordpress theme?
- Should I use add_filter for functions in function.php of the theme?
- Pass variable to hook. Its possible?
- Redirect to another page using contact form 7? [closed]
- Replace single_template filter with what for default posts?
- Can’t change theme name
- How to set default values for edit_post_link() in my theme?
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- apply_filters to featured image
- Get the blog page URL set in Options
- Issues with title-tag and document_title_parts
- How to remove the Theme Customization Button from the dashboard and themes options page?
- What are the ADVANTAGES of ORIGINAL wordpress template structure?
- Create “File-less” Page Template in Functions.php
- Any official way to create an admin theme?
- Including CSS and JS on Admin Screen of Custom Theme Options
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Best practices – Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)
- How to disable 3.1 “Admin Bar” via script for the admin user?
- Run shortcode before filters
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Removing the default sidebar from admin panel
- Default or Preset Content for Custom Post Types
- How the WordPress sidebar works
- Should we localize custom-made themes / plugins?
- Extend walker – navigation, adding data attribute to a tag
- How can I remove the Static Front Page option from the Customizer
- How can i customize the comment list
- Change date number to another language/script?
- Allow role to delete posts but block him the wp-admin
- How to handle theme customization and sass variables
- wp_enqueue_scripts not called on search page?
- wp_head() not inserting the default stylesheet style.css
- Is using eval() ok in this scenario
- Custom php page in WordPress theme?
- First completely customized theme, where should I start?
- Different Admin Theme – Based on Role?
- Theme Customizer not loading
- Display site admin profile fields in header.php
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Best practices: Custom theme sidebar menu – hardcode or widget?
- Can’t access WordPress functions in file called via Ajax?
- What’s the best action to use when you want to do something only once per theme setup?
- WordPress Genesis Child Theme Filter divs
- Customizer API and add_panel(). Panel doesn’t show
- How to correctly add JQuery in a WP theme?
- How would go about if I just want a temporary function?
- What is the best way to handle multiple calls to get_template_directory_uri() and similar functions?
- How to call custom function from functions.php in site-wide template files?
- trying to use wp_handle_upload with ajax
- str_replace function in theme
- Removing non native customizer settings from a child theme
- How to reorganize the items returned by wp_list_comments()?
- which is the best way to customize nav-menu-template.php?
- Menu item added in wp_nav_menu_items filter is never highlighted
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Where can i design and modify a new mail template for sending emails to users when commenting?
- Can’t work out why widget contents disappear from admin
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- Limitations when modifying wp_title with a filter
- How to edit theme functions file to modify pagination?
- “Add A Widget” button in the Customizer
- Insert image in WordPress with HTML5 tag and caption function
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- Move default page templates to sub directory
- Admin search post meta
- Remove “You are using WordPress 3.2.1” from Right Now Dashboard Widget
- WooCommerce: multiple input field for multiple product variations
- Integrate WooCommerce theme with a WordPress theme [closed]
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- How to rotate every letter in a title
- CSS class on last post in loop ( custom query )
- Use a filter on menu items that have children
- Modify available templates (in dropdown)
- searchform.php doesn’t work properly
- Customizer: get_preview_url() inside customize_save_after hook
- How to add custom meta box when you have a custom page template file
- How to add aria role and schema markup to custom walker container
- Right procedure when you develop a WP Website for a client
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Add content after get_header
- Filter didn’t work on content class (hybrid_post_attributes)
- How to custom category template based on category?
- show_option_none not working in meta box
- Pagination don’t work with active filters
- restrain filter on get_the_excerpt to queried item in stead of current post
- Alt header logo and link for specific pages
- What is the best practice workflow for new website overhaul and keeping current SEO ranking? [closed]
- Any way to permanently translate themes?
- Hook in parent theme Menu function
- How to add custom nav_menu_css_class to certain menu only?
- How to share posts (and plugins) between existing site and new, separate dev/test installation?
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- WordPress 3.5 + Foundation 5 not working on IE9
- child_of not working while searching
- Permalinks problem with custom theme
- How to set up a development/staging site to make major changes to the theme then update on the live site?