I understand that I can choose to show/hide a page for logged in users by using the following:
<?
if ( is_user_logged_in() ) {
<li><a href="#">Link Title</a></li>
}
?>
But is it possible to show a page only to a certain user? For example I want ‘John’ to see a page but not ‘Bob’ so can I do something like:
<?
if ( is_John_logged_in() ) {
<li><a href="#">Link Title</a></li>
}
?>
Any advice would be brilliant!
you can use the function get_currentuserinfo(); to retrieve information about the current logged user.