You can restrict any area with is_user_logged_in()
function. For example: If you want to hide search for non-logged-in users then enclose search DIV
inside this function like this
if(is_user_logged_in()) {
<div class="search">
</div>
}
Search for the DIV
that contains Search Box
and apply function as shown above. By this way you can restrict any area for non-logged-in users.
NOTE: Since you are new in PHP
, Don’t forget to enclose this function inside php tags (<?php
?>
). And also make sure you don’t open <?php
for this function if it already being opened.
And about your Plugin suggestion, Plugin recommendation is off-topic here. We cannot suggest any plugin as per the site rules, So you have to find your desired plugin by yourself.