You might be looking for a logged in conditional. From the WP Codex, you might be able to try in your theme (untested):
<?php
if ( is_user_logged_in() ) {
get_currentuserinfo();
echo 'Logged in as ' . $current_user->user_firstname;
}
?>
EDIT
After consulting the WP Codex on the topic, I was able to display my user’s identity using the following:
if ( is_user_logged_in() ) {
global $user_identity;
get_currentuserinfo();
echo 'Logged in as ' . $user_identity;
}
Related Posts:
- Remove the deleted users avatar from list
- Unable to login using username
- Condition OR for current user ID
- Secondary Menu and Logged In Users
- Show errormessages on wrong username/password on custom loginform?
- How to replace ACTION url from original wordpress login form?
- How to request login for user but not for bots
- wp_login_form display no styled form
- Add custom css to specific user
- When a user logs in, how can they view the website instead of the admin menu?
- User can not login
- WordPress PHP Conflicting User Sessions
- Move Custom Fields on General Settings Page to New Location
- Get User Login Data (date, time… )
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Registration Hooks don’t appear to be working
- Multi-site User Sessions
- different style sheet for just one page template
- How to retrieve the current post’s generated featured image size?
- If user is logged-in display/hide something
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Where do I store custom functions that call custom page template files?
- Why There Is No “get content by ID” Function
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- Wp-query Order By problem
- How to Use Global Variables Inside Header and Footer
- Create custom function for hero image
- Randomizing wp_tag_cloud() in child theme
- Why get_user_by() doesn’t work in my code?
- login_headertitle is deprecated since version 5.2.0
- How to append classname to body tag if guest user
- Where do I go to edit this area? [closed]
- Filter to wp_list_authors
- Prevent WordPress Automatic Logout
- error at login page in wordpress
- Replace plugin function with a custom function?
- Add attribute only to first image of every post via functions.php
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Different favicon on different pages
- The_content and Preg_replace in loaded Iframe [closed]
- Logout Redirect and also WP-login.php Redirect
- How to add array [closed]
- Delete a user from frontend
- Add Link to Users List (Backend) to open each users front-end profile
- Problem with images URL after filter applying
- Suggest Users basing on User taxonomy
- two search forms on the same page
- Showing user profile data on front-end
- Function to replace comment’s accented characters before posting
- Modify function to only return values for the user that’s logged in
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- how to display a page before the home page
- User meta and public function security
- call wp_insert_user in custom class doesnt work
- Get users with different roles and call function on each of them (user_meta)
- Add Login and logout buttons to top menu bar
- Function to check if custom page is used by page?
- How can I show different content for different user-levels?
- implementing a centralized content “show-do-not-show” toggle?
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- Custom user role still showing up after deletion, ideas?
- referencing the current user in a page i created in wordpress
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- WordPress login set cookie that survive browser exit (wp_signon function)
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- Prevent wp_signon redirect on failed login for ajax login
- How to redirect Subscribers on login to specific page, when logging in from a Page
- Show metadata in users.php – wordpress
- How to remove font awesome from loading in wp theme
- How to block specific user id in custom login form?
- Header menu aligned right on all pages except for single-post page [closed]
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Deleting guests profile users after 1.5 hours
- Modifying a WordPress Plugin
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- CF7 select value get to function and reciept value from function
- wp_get_current_user return ID = 0 when used outside of wordpress, such as webhook / fulfillment dialogflow
- Hide author info in single posts by certain users
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- Unable to login after registration
- CSS style and app.js not loading
- Allow user only create specific tags
- Add Change role button for list of user in an event
- get_current_user_id() always return 0 in if else statement
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- Parent category as WOOCommerce Categories widget title
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- Shortcode to insert default text and change one word throughout it?
- I want to customize the_posts_navigation function by replacing prev and next with images
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- How would I correctly implement a new if statement in a child functions file?
- Woocommerce custom calculation function
- is_user_logged_in() not working in homepage
- Remove all video attachment, both files and post/postmeta from database?