There is no way to do this based on registered vs unregistered status because all users are anonymous until they log in. If you mean “logged in” vs “not logged in” then …
if (is_user_logged_in()) {
// logged in content
} else {
// not logged in content
}
Reference:
http://codex.wordpress.org/Function_Reference/is_user_logged_in
Related Posts:
- Send email to all registered users [closed]
- Registered access area
- How to allow an user role to create a new user under a role which lower than his level only?
- How to programatically change username (user_login)?
- How to get userid at wp_logout action hook?
- What’s the difference between the capability remove_users and delete_users?
- How to change user_login with wp-cli?
- Replacing the WordPress password validation
- alphabetically order role drop-down selection in dashboard
- WordPress auto login after registration not working
- Change the author slug from nickname to ID
- How to hide media uploads by other users in the Media menu?
- Retrieve all users from wordpress database via REST/JSON API
- Get users with atleast one post
- edit profile validation refreshes all field if missing wordpress
- How to order users alphabetically by their last name?
- Wp_User_Query not sorting by meta key
- How to use hyperdb to separate and share a user dataset between wordpress installs?
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- pre_user_query meta_query admin user list
- Return ID of authors who have at least one post
- How to list users that have written custom post types and hide the ones that have not?
- Front end user meta options for users
- Get total number of authors on the site
- How to migrate wordpress users from one blog to another
- Find out when a user was created and display varied content depending on time since creation
- Drop down list in user profile page
- How can I link users across multiple subdomains?
- Create user with author role but no login information
- Importing Existing Users with Passwords
- Create not-activated user in code, wordpress
- How to add user meta for all users
- Hide everything on site for visitors except specific page IDs
- current user can edit user?
- WordPress Authentication Middleware
- Add email addresses to already registered users
- How to set show admin bar front to true for all users?
- show text If special user is logged
- Multiple Backend Users as single Frontend User
- Forcing WordPress to work differently
- Does WordPress Importer notify imported Users?
- Can user login details be used for other applications?
- Bulk create clean user_nicename from user_email with SQL function
- Updating wp_user_level on user update
- How can I attach a user to another user with user meta
- How do I protect user_activation_key?
- WP not logging in at first time
- Log out users from every where
- Separate Out Real Users
- How to prevent a specific users’s profile photo (gravatar) from showing on the frontend to other users?
- WordPress REST Api: update user
- Hackers tried user name with wrong case [closed]
- How to set custom avatar for users?
- How to do a task only once for logged in users
- How many people are allowed to use same wordpress account at the same time?
- How to add registration date and last login date to user list page
- Filter users in a search
- SQL Bulk update all WordPress user’s nicknames to firstname + lastname format
- Redirect logged on user to a specific page based on wp user role, page id
- How to set all external links from a certain user to “nofollow”?
- Show WordPress users in grid with image and name
- How can i login with user’s password in WordPress being an admin?
- Automatic Website user password generation
- Redirect users after login
- How to hide some users to unlogged users [closed]
- List all users and current week entries
- Need to manually add multiple WP users with same e-mail address (with good reason)
- How to get current user on a multi site that is using domain mapping?
- Use members from 1 site on another one
- WordPress Redirect Specific User. Tired of Peter’s redirect Plugin its not working
- Can I edit the database to change a login?
- User(s) already exists show error please provide a valid username
- User Meta stuff
- Is it possible to make specific posts editable by all authors?
- User can’t search himself on rest api
- How do I update user email from frontend input field?
- Cannot update newly added User field using wp_update_user
- Block editor completely gone for second of two super user
- How to create page for user?
- How to prevent multiple user accounts with the same meta field?
- How do I set a maximum upload size for a specific user role (Editor)
- members only products
- Modify the user data stdObject and add extra items to it?
- Create relationships between users or user roles
- wp_update_user() returning http 500 internal server error
- User Permissions on custom post type
- update custom field user profile from front end form
- Insert user register into my own user table instead of wp own user
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- I try to add informations to User profile
- Manage user profiles with WordPress
- Limit roles displayed in users.php depending on custom role
- Add a column before username in the users profile table
- Will mass deleting WP Users then reimporting CSV with the same userid break WP?
- Privacy in WordPress
- Create a wordpress admin user and only let them edit and post blog posts?
- Shopping plugin with user groups [closed]
- How to allow users to make quizzes or tests in WordPress?
- Sorting Users page admin column with ACF field
- Can we get user profile page using user_id in the URL?