martes, 17 de noviembre de 2009

Displaying user data in your Wordpress theme

The last time I needed to display user data was for the Press Stick website. For their site, they wanted the user to be greeted with a personalised message on logging in.

The message for the Press Stick site was:
"hi from . welcome back to the press-stick sourcing portal. we look forward to showing you the new and exciting products available to you."

For the purpose's of this site, we tweaked the standard Wordpress user data so that the user's magazine name would be stored in the 'Nickname' field. To return the message above, we simply insert the following:

user_firstname.' '.$current_user user_lastname;
$magazine = $current_user nickname;

echo '';

No hay comentarios:

Publicar un comentario