You can try something like this and implement it in your own case
<?php
if ( is_user_logged_in() ) {
$extraClass = "hide-button";
} else {
$extraClass = "";
}
?>
<a class="<?php echo $extraClass;? href="#">">Button text</a>
and give the new class a styling like “display: none;” or something
Related Posts:
- Allow up to 5 Concurrent Login Sessions
- Restricting wordpress login sessions for a web app
- Changing user_login ends current session
- determine active user browser at the same time
- How reduce wordpress login session timeout time?
- Replacing the WordPress password validation
- Ban a user and end their session
- WordPress auto login after registration not working
- Why does is_user_logged_in() return false after redirect from another site?
- share login/logout sessions across two installs?
- Pre-populate Username Field
- How to keep track of user logins?
- Get user info outside WordPress
- How can I secure a WordPress blog using OpenID from a single provider?
- Is it possible to get a user with just the password field?
- Redirect after login based on user role (custom login page)
- Check for user meta data at Login
- Redirect User to Homepage if no other redirect is specified
- My custom page template with is_user_logged_in() does not detect that I’m logged in
- how to logout user on browser tab or window closes
- Use phpbb user database for WordPress
- Custom Connect to Facebook, problem logging in/logging out
- WordPress to use Drupal users’ credentials
- Share user table from WP with Drupal
- How can I allow password reset based on logins containing the @ character?
- A way to count logged in users and display count?
- stop login if user_status equal zero
- Force logout ALL users at a certain time
- How do i make my wordpress website private?
- Redirect user to login before viewing custom post
- How would I hook into `clear_auth_cookie` to return the user’s ID that’s currently being logged out?
- Change the user_login at registration
- Max no of simultaneous active sessions for a single user
- When I try to login in wordpress it is showing “USER Doesn’t Exists”
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- Redirect subscribers to last viewed page after log-in
- Session Experies and Get Logged Out Within Few Minutes
- wordpress disable login for unverified user
- Reset Password policy
- Rewrite Rules and Login Issue
- Is possible to allow user to login with different role?
- Use WordPress Login for a non-wordpress site
- WordPress Login Customization for External Authentication
- Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)
- Is there any action /filter hook I can use to disable login for some user role?
- How to check User Role and redirect to specific page according to Role when login in WordPress?
- Display video on homepage for users who have not logged in
- How do you manage your pages or functions that require logged-in users?
- How can i login with user’s password in WordPress being an admin?
- How to Show Different Menus to Logged in Users in WordPress [duplicate]
- Delete a user from frontend
- Check if user is logged in via JS? [duplicate]
- Use members from 1 site on another one
- Can I edit the database to change a login?
- how redirect users to custom login page when “login to reply” is clicked? [duplicate]
- User(s) already exists show error please provide a valid username
- wp_generate_password sets password but can’t login using created password
- Is there a way to call via javascript if a user is logged-in on a static html file?
- How to connect wordpress user with my own APP user?
- How to change default username field after login
- Login issue with subdomain installs
- The same session information for peer users on two different WordPress servers
- WP users cant reset password
- Check for empty username or password on login
- How to destroy all user sessions via WP-CLI
- $user_login is not working if author has only 1 post
- WordPress session times out – but doesn’t log out?
- Specific Content on pages based on user
- user and usermeta table not found
- custom login form, guide me
- Current User Seeing Another Logged In User Info
- Redirect based on log-in status per JavaScript
- Securely log in a user without a password using a link?
- Integrating Facebook Registration (and Login) on a WordPress page
- how to manage Session in WordPress using custom login?
- WordPress – Security Question at Login from User’s Meta Data
- How to track all users logged into a site?
- Cant edit profile from frontend
- How to authenticate/verify login credentials & check for user meta without logging in?
- Recognize logged WP user in existing REST API
- List users by last name in WP_User_Query
- How do I list in the backend all users that were assigned to a custom role?
- get_user_meta an ID for multiple functions
- Which function is called after update any field of user from any where of the site
- Allow unfiltered HTML for not logged in users when saving a post
- Users – remove ‘send password’ checkbox
- Send email to all registered users [closed]
- Send clear password via mail
- How to get users by specific ID’s WordPress
- Didn’t get array of users like in delete action WPList table in users tab
- Recovering the table wp_usermeta from users
- I want to change my user name
- Unique password to access a section site
- Cannot Modify Header Info Error on updating User Profile
- hide user is currently editing warning in admin post page
- Check if user had autologin & if so, logout
- Custom User Role: Can Edit Own Page, Cannot Create New
- Cannot login in WordPress even after changing hash password in phpmyadmin
- Edit dashboard based on user ID
- Set a minimal number for next user_id