title: How do I add CSS only for certain user roles?
body: <p>On all posts, I'm trying to hide the Update button, which is contained within this box:</p>
  
  <pre><code>&lt;div id="postbox-container-1" class="postbox-container"&gt;
  
  </code></pre>
  
  <p>I only want to hide this box and button for a certain user role, 'Bookings Viewer', which I have created. Here is my code so far:</p>
  
  <pre><code>//Hides the update button for the Booking Viewer user role
  add_action( 'wp', 'hide_update_booking_viewer' );
  function hide_update_booking_viewer()
  {
      $user = wp_get_current_user();
      if ( in_array( 'Bookings Viewer', (array) $user-&gt;roles ) ) { ?&gt; 
      &lt;style type="text/css" media="screen"&gt;
  #postbox-container-1 {display:none;}
  &lt;/style&gt;&lt;?
  }
  
  }
  </code></pre>
  
  <p>Currently the code, which I've placed into functions.php, seems to have no effect. What am I doing wrong?</p>