I have the code below and it results as true
with the or
or ||
logical operators. I remove the second condition and it works as expected. What am I doing wrong here?
$user = trim(get_user_role());
if ($user != 'administrator' or $user != 'editor'){
echo '<script type="text/javascript">';
echo 'jQuery(".nav > li").eq(2).hide();';
echo 'jQuery(".nav > li").eq(3).hide();';
echo '</script>';
}
I even echo
the user and it is administrator, so I know that part is right.