Here is my situation. I am currently working on a custom theme and there is one issue that I cannot seem to resolve.
Basically, I want to use the user_identity function on the header.php file for a user bar.
Here is my code:
<!-- User Start -->
<?php if ( $user_ID ) : ?>
Welcome <b><?php echo $user_identity; ?></b>!
( <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout">Log Out</a> | <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php">Profile</a><?php wp_register(); ?> )
<?php else : ?>
Welcome <b>Guest</b>!
( <a href="<?php echo get_option('siteurl'); ?>/wp-login.php">Log In</a><?php wp_register(); ?> )
<?php endif; ?>
<!-- User End -->
I know that my coding isn't the most optimized but that wouldn't be the reason for the function to not work.
I would be most grateful if someone could assist me in resolving this issue.