Log In Bar for Logged Out Users
-
I need a hashbar on my website that shows up when user is not logged in. The bar will say something like Login or Register.
Once the user is logged in, it will no longer show up.
I’ve found the snippet below on a separate thread. However, it does the exact opposite for me. When I’m logged in, it shows up, and disappears when I’m logged out. What is causing this? Thanks ??
add_filter('hashbar_should_output', 'hashbar_wpnb_should_output', 10, 2); function hashbar_wpnb_should_output($status, $post_id){ if ( !is_user_logged_in() ) { $status = false; } return $status; }
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Log In Bar for Logged Out Users’ is closed to new replies.