I was wondering if someone could explain how to roughly code this into php:
if catergory = Cars && user is unregistered
<my code>
else
<my code>
I was wondering if someone could explain how to roughly code this into php:
if catergory = Cars && user is unregistered
<my code>
else
<my code>
You must be logged in to post a comment.
ID will be 0 in the
$current_user
object, if the user isn’t logged in.Related reading:
is_category
wp_get_current_user
EDIT
Try using
is_user_logged_in()
andin_category()
instead: