-
AuthorPosts
-
February 27, 2015 at 1:03 pm #216769
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.
February 27, 2015 at 1:05 pm #216770This reply has been marked as private.February 28, 2015 at 4:16 am #217131Hi there,
I can’t see toolbar (Check :http://prntscr.com/6aub9q), Would you provide us with screen shot.
Thanks.
February 28, 2015 at 7:01 am #217183Thank 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-barThis 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.February 28, 2015 at 10:46 pm #217551Cool, nice work 😉 and thanks for sharing!
December 29, 2015 at 9:13 am #724385Hi,
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,
MilesDecember 29, 2015 at 9:49 am #724411Hi 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!
-
AuthorPosts