Site logo

Archived topic

Header with two hooked block elements when logged in/out not styling correctly

5 replies · Started by Gary on February 2, 2023

Viewing posts 1–6 of 6

Hi GP

I have encountered an issue using two separate block elements and the logged in and logged out display conditions.

I'm trying to have some buttons/links hooked into the header change depending on logged in/out state. I can get that part working fine, but I've started to notice the styling of the GB button block breaks, usually after being logged out and then loggin in or vice versa. It's as if the styling for each state is not available if it changes.

I found a support thread here reporting a pretty similar issue using logged in/out display conditions but it was never resolved.

https://generatepress.com/forums/topic/different-site-headers-for-logged-in-and-logged-out-user-and-different-pages/

I'm wondering if there's anything I need to be aware of here regarding GB styling and the logged in/out state? Regenerating GB's CSS cache and clearing the caching plugin I use restores the styling of either state but it usually returns again.

Would be grateful of any advice on how to get it working and styling correctly between the two states.

Thanks

Hi there,

do you use GB pro ? As i believe the current solution is to use GB Pro Global style.

Hi David

Sorry for my slow reply, I must have neglected to click receive updates as I didn't get notified of your reply.

So I'm guessing from your reply you mean this is an issue with the way GB generates the CSS at the moment between the two states, but creating some global styles for the logged-in and out states would fix the issue and make sure styles from both block elements are present?

Thanks

To the best of my knowledge yes, as global styles are loaded regardless, so they should be present no matter what the login state is.

OK thanks, I'll give that a try.

You're welcome

This archived topic is closed to new replies.