Support
Support » Fixing WordPress » Unlogged user and comments
(@anup)
12 years, 10 months ago
Hi.
I am trying to hide comments by admin to unlogged users.
I am not sure, if it is simple or difficult.
<?php if (!is_user_logged_in() && is_post()) { get_comment( !user_id => '1' ); } else if (is_user_logged_in()) { get_comment(); } ?>
would placing such code at appropriate place in comments.php work? or does it need to be something more elaborate. Any help is appreciated.
(@anup)
12 years, 10 months ago
Hi.
I am trying to hide comments by admin to unlogged users.
I am not sure, if it is simple or difficult.
<?php if (!is_user_logged_in() && is_post()) { get_comment( !user_id => '1' ); } else if (is_user_logged_in()) { get_comment(); } ?>
would placing such code at appropriate place in comments.php work? or does it need to be something more elaborate. Any help is appreciated.