Hello,
I want to know if it's possible to make determinated content show only if the user of the post has and role higher then X.
For example, make and div TEST in the single.php, if an "Author" post, it doesn't show. If an "Administrator" post, it show.
Is that possible?
Thanks
Ravinder Kumar
Member
Posted 4 years ago #
hi
check this.gud luk.hope this will work for you
also this
I tried this two ways, didn' work:
<?php
global $userdata;
get_currentuserinfo();
if ( $user_info->ID == 1 )
{
echo 'User is an Author';
}
else
{
echo 'User is not an Author';
}
?>
and
<?php
$user = wp_get_current_user();
if ($user->ID)
if ( $user->ID == 1 )
echo 'Admin';
else
echo 'Autor';
?>
It only shows to first echo :/