Skip Navigation

[Resolved] How to disable admin bar for all users except administrators

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.68 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 12 replies, has 2 voices.

Last updated by maiS 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1807913

I can't seem to create a new ticket because the link you have to press to create a new ticket isn't working for me so maybe you can help me create these tickets:

1) When you are logged in, the black wordpress top bar is showing up - is it possible to hide this bar for all users except the admin users?

2) If I want to design a login page for users that are not admin is this possible? It is just to make the login site a little more personal with our own logo etc.

3) Under "my account" - is it possible to show the First Name of the user instead of the created user name when you are logged in? Is it also possible to change the menu name form My Account to the users first name? do you know what I mean?

Thanks. Sorry for the inconvenience.

#1807915

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

To hide the admin bar for all users excluding administrator users, you should try to add the following code to "Custom Code" section of Toolset or to your 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(false);
}
}

More info:
=> hidden link

#1808049

Hi there,

If I add that code to my child theme function.php I get this error on my site:

Parse error: syntax error, unexpected end of file in /var/www/marketing-copenhagen.dk/2findsportscamps/wp-content/themes/dt-the7-child/functions.php on line 40

#1808053

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

It seems one ending braket was stripped out.

Can you please try to use the following code:

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

it should work.

#1808063

Thank you it works!!

Okay I tried to create a new ticket again but I still can't get the link to work? Can you help me creating this ticket:

Hi there,
On our page the user creates a camp purely from frontend forms. When they have created their camp a custom template is automatically made with their information in it and they can see their camp under "My Account". I would like if it was possible for them to edit their camp-information in the template IN THE FRONTEND. At NO POINT the user should access the backend. Is it possible to give the users an edit function under "my account" that makes it possible for them to edit the specific camp within the template but without editing the layout of the template?

#1808129

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

That is really strange that you are not able to create a ticket as no other user reported the such issue and we keep getting new tickets created by other users.

What if you try to logout and login again to Toolset.com and check if that helps?
- Also, it will be great if you can share what exactly stopping you creating a new ticket. Do you see any errors or it will be great if you can share step by step information which you follow to create a new ticket or video so that I can able to see whats bothering you creating a new ticket.

#1808133
Skærmbillede 2020-10-12 kl. 10.36.08.png

Of course, so I go to support ---> techical support. Then I can see the tickets that I already have but I wanna open a new one so I press the link in the bottom. But nothing happens when I click it, I just stay on this site. I attached a screenshot so you can see. I will try to log out and log in again, just give me a minute.

#1808147

Okay, so I just logged out and logged in again but it did not help. I also tried another browser but still the same result. Im very sorry about this, maybe I am doing something wrong?

#1808283

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share the URL of the page from where you are trying to create a new ticket?

#1812691
#1812705

I think i know what it is now. I can only have 3 OPEN tickets at the same time. That is of course a problem since we are trying to develop a huge project. So if it is easier for you guys that i create a new ticket for each problem i will need the possibility to add more than 3 tickets at a time.

#1813677

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I shared your concern with our system's team and they will see what they can do.

For now, if you do not able to create tickets, ask supporter you are interacting with and they will help you to split the ticket with every new question you may have.

As original issue is already addressed with this ticket, please feel free to mark resolve this ticket.

#1816189

My issue is resolved now. Thank you!