I have a wordpress site and I want to display the info of the logged in user (eg. his username) in a php page.I've seen related posts to this and I tried this:
<?php
global $current_user;
get_currentuserinfo();
echo $current_user->user_login;
?>
However, I'm getting an error "Call to undefined function"...What am I doing wrong?