Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #216769

    mpark0701
    Participant

    Hi

    1. I followed this instruction, but it doesn’t work. Even though users are not logged in, toolbar stay on top. Can you help me please?

    #134279 adding following code in your child theme’s functions.php file:

    add_action('after_setup_theme', 'remove_admin_bar');
    
    function remove_admin_bar() {
       if ( !current_user_can( 'administrator' ) && !is_admin() ) {
         show_admin_bar( true );
       }
    }

    2. Do I have to use 3rd party plugin to register and log-in frontend? Currently registered subscriber user log-in through /wp-login.php , it goes directly to backend pages.

    I would like to setup 1. No toolbar on top of page except administrator 2. After new user register (or current user logins), home page should be opened , not backend page 3.

    Thanks.

    #216770

    mpark0701
    Participant
    This reply has been marked as private.
    #217131

    Christopher
    Moderator

    Hi there,

    I can’t see toolbar (Check :http://prntscr.com/6aub9q), Would you provide us with screen shot.

    Thanks.

    #217183

    mpark0701
    Participant

    Thank you for reply. Actually, I found better way to solve How To Remove Links From WordPress Admin Bar from here :
    http://www.paulund.co.uk/how-to-remove-links-from-wordpress-admin-bar

    This article really helps me understand how wp admin toolbar works. I remove all the links from top admin bar except logged-in user link. Admin user can see all the links on the top admin bar. Hopefully it helps anyone who has the same issue.
    The functions.php under child-theme works great.

    #217551

    Rad
    Moderator

    Cool, nice work 😉 and thanks for sharing!

    #724385

    mthomas91
    Participant

    Hi,

    I’m struggling here.

    I don’t want the wordpress bar to show at the top when users are logged in. (except for when an admin is logged in)

    How can I achieve this?

    My url is – http://www.freematchedbetting.com

    Many thanks,
    Miles

    #724411

    Thai
    Moderator

    Hi Miles,

    Please try adding the following code under functions.php locates in child theme:

    add_action('after_setup_theme', 'remove_admin_bar');
    
    function remove_admin_bar() {
    if (!current_user_can('administrator') && !is_admin()) {
      show_admin_bar(false);
    }
    }

    Hope it helps!