php code to hide something
-
<?php $nummod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
if (0 < $nummod) $nummod = number_format($nummod);
?><b>In Moderation:</b> <?php echo $nummod ?> ...
The above code is in my sidebar.php which will display the count of comments that are awaiting moderation. but i don’t want the reading public to see it. i want it to be displayed if the user is logged in.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘php code to hide something’ is closed to new replies.