title: Adding a class in php if one field is displayed
body: <p>I'm working with the ACF plugin in Wordpress, and on the page displaying all my articles, I would like to style them depending on their categories (which are set with the ACF plugin). So basically the idea is to say : if this article is displaying the "movies" category, then give it the class "blue".</p>
  
  <p>I've been trying a few things but none of them work :( Since I'm not a PHP pro, I was wondering if anyone out there could help me out with the right syntax ?</p>
  
  <p>This is how I conditionnaly display a field :   </p>
  
  <pre><code>     &lt;?php if ( get_field('site_web') ): ?&gt; 
      &lt;span class="niveau"&gt;Site Web : 
  &lt;a href="&lt;?php the_field('site_web'); ?&gt;" target="_blank"&gt;&lt;span class="white"&gt;
      &lt;?php echo the_field('site_web') ?&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
                                        &lt;?php endif; ?&gt; 
  </code></pre>
  
  <p>So if the field <code>site_web</code> exists, give it the class <code>red</code></p>
  
  <p>Thanks for the answers !</p>
  
  <p>_________ EDIT ____________</p>
  
  <p>Jeez okay I've just realized how what I just posted has no sense.
  The actual problem (and I should've mentionned that straight away) is that if the field is displayed, it means it's displaying three different possibilities.
  In the ACF plugin I've created a field displaying levels : easy, hard, very hard.</p>
  
  <p>So I'd like to display a class depending on the level it's displaying !</p>
  
  <p>Thanks ever so much for being so reactive, and helping me out. And sorry for not being very clear...</p>