title: Change CSS for logged in users WordPress | X Theme
body: <p>I am attempting to change some css to display:none; when the user is logged in. 
  It's just a "Sign In / Register" link. ( so when the user is logged on they wont see it) </p>
  
  <pre><code>&lt;span class="hide-this-class-when-logged-in"&gt;&lt;a href="#"&gt;Sign Up / Register&lt;/a&gt;&lt;/span&gt;
  </code></pre>
  
  <p>I have copied my _header.php file into my child theme, and replaced</p>
  
  <pre><code>&lt;body &lt;?php body_class(); ?&gt;&gt;
  </code></pre>
  
  <p>with this </p>
  
  <pre><code>&lt;body&lt;?php echo (is_user_logged_in() ? ' class="logged-in"' : ''); ?&gt;&gt;
  </code></pre>
  
  <p>thinking that this would provide an additional .class for logged in users, so I could then </p>
  
  <pre><code>.class {display:block}
  .class .logged-in {display:none}
  </code></pre>
  
  <p>but the body got all screwed up,( everything got a float left; ) and I am back to the drawing board. </p>
  
  <p>Any input on this topic, or how to use body_class() with x theme would be really appreciated. thanks. </p>