Site logo

Archived topic

Change menu background color when a user is logged in?

7 replies · Started by Anders on May 13, 2019

Viewing posts 1–8 of 8

Hi there,

Does anyone know how to change the background color of the main navigation and sticky navigation when a user is logged in on the front-end of the site, would love to be able to do this, to just get the users attention that he is now logged in. In my case he has completely different meny items showing links to his profile, support area and so on.

Would very happy if someone could share their solution, been a long day, and probably it is easier then my head can grasp now .. =)

Hi there,

Is there a unique body tag when a user is logged in?

Hi Leo,

No, I only set certain links on the menu do show if logged in and the rest to show users/visitors that are not logged in, nothing fancy. Used the plugin "If Menu – Visibility control for Menu Items" by Layers at https://wordpress.org/plugins/if-menu/

So there isn't a unique class added to the body tag when the user is logged in?

I need to check that .. Like a "logged-in" tag of some kind?

Yup. Or check with the plugin author if you can add a unique tag to the body class when it's logged in.

Ok, will look in to that later, thanks .. Will update thread tomorrow, time is 01.20 here in Sweden .. =)

Sounds good :)

This archived topic is closed to new replies.