Skip Navigation

[Resolved] Hide button in header when logged in

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.60 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by maiS 4 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1796787

Hi,

Can you help me hide this green button when i user is logged in? It doesn't matter what the user role is, because if they log in they already signed up and this button say "sign up!". I would like it to hide when a user is signed in.

#1797465

Hi,

Thank you for contacting us and I'd be happy to assist.

When a user is logged in, a special class "logged-in" is added to the "body" tag of the page.

You can use it in the custom CSS code, to hide the green button in the header, only when that class is present.

For example:


body.logged-in .header-bar .mini-button.header-elements-button-2,
body.logged-in .mobile-header-bar .mini-button.header-elements-button-2,
body.logged-in .mobile-header-scrollbar-wrap .mini-button.header-elements-button-2 {
display: none !important;
}

Note: You can include this custom CSS code using the "Additional CSS" section (WP Admin -> Appearance -> Customize) or any other feature that includes it on all pages.

Tip: To check which CSS code is applying to different page elements, you can use Google Chrome's inspect element tool, as explained in this guide:
hidden link

regards,
Waqar

#1801287
Skærmbillede 2020-10-06 kl. 08.38.30.png

Hi Waqar,

It works thank you. I have another issue but now (again) I can't create a new ticket. Can you help me split this ticket?

My problem is:
I just updated Toolset plugins and now the blue row on the front page again won't center. You guys have helped me a lot with this problem but now all the settings are correct but the row is still to the right on the mobile phone AND on desktop. See screenshot. Can you help me? the row is set to no padding or margin as it used to solve the problem.

Thanks.

New threads created by Waqar and linked to this one are listed below:

https://toolset.com/forums/topic/split-incorrect-padding-applied-to-one-of-the-homepage-sections/

#1803043

Thanks for the update and glad that it works.

I've split a new ticket for the other question and will reply to it shortly.
( https://toolset.com/forums/topic/split-incorrect-padding-applied-to-one-of-the-homepage-sections/ )

You're welcome to mark this ticket as resolved.

#1803521

My issue is resolved now. Thank you!