I've got a new php page and I am using wordpress for this site.
From inside my new php file I have incorporated wordpress_load..
that we believe is needed to be able to retrieve current user particulars.
I have then attempted to echo the present loginname:
but it is being released empty and that i know it isn't..
This is exactly what I am trying...
include ('wp-load.php'); global $current_user; $current_user = wp_get_current_user(); $myuserlogin = $current_user->user_login; echo $myuserlogin;
This isn't coming back anything...
I am I missing anything?
This is actually the var_dump result:
[object Object]1object(Wordpress_User)#79 (10) ["cap_key"]=> NULL ["roles"]=> array() ["allcaps"]=> array() ["first_title"]=> string() "" ["last_title"]=> string() "" ["filter"]=> NULL
<?php include ('wp-load.php'); global $current_user; $current_user = wp_get_current_user(); var_dump($current_user); ?>