Title: Hide empty boxes from user users
Last modified: August 24, 2016

---

# Hide empty boxes from user users

 *  [ZoXx1991](https://wordpress.org/support/users/zoxx1991/)
 * (@zoxx1991)
 * [11 years ago](https://wordpress.org/support/topic/hide-empty-boxes-from-user-users/)
 * Hey,
    you posted sometime ago this code:
 *     ```
       <?php
       //get comments and comment form as a var
       global $post;
       $comments = get_comments('post_id='.$post->ID);
       $com = '';
       foreach($comments as $comment) :
           $com .= '<div class="com_container">
               <div class="com_author">'.$comment->comment_author . '</div>
               <div class="com_content">' . $comment->comment_content.'</div>
               </div>';
       endforeach;
       ob_start();
       comment_form();
       $com .= '<div class="com_form">'.ob_get_contents().'</div>';
       ob_end_clean();    
   
       //here you have two options, either to set the shortcode manually for each page:
       //$com = '[O_U user_id="1,2,3" blocked_meassage="comments are closed for everyone!"]'. $com .'[/O_U]';
       //then run it by the shortcode
       //echo do_shortcode($com);
   
       //or you can create a new instance of the plugin class and let it use the same sattings as the content on that page:
       $limit_C = new bainternet_U_S_C();
       echo $limit_C->User_specific_content_filter($com);
       ?>
       ```
   
 * does it sill works or is it old?
 * we want to hide the empty boxes from the user users….
 * [https://wordpress.org/plugins/user-specific-content/](https://wordpress.org/plugins/user-specific-content/)

The topic ‘Hide empty boxes from user users’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-specific-content_ffffff.svg)
 * [User Specific Content](https://wordpress.org/plugins/user-specific-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-specific-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-specific-content/)
 * [Active Topics](https://wordpress.org/support/plugin/user-specific-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-specific-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-specific-content/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ZoXx1991](https://wordpress.org/support/users/zoxx1991/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/hide-empty-boxes-from-user-users/)
 * Status: not resolved