floating an image above a specific taxonomy termed node I have to create a website that allows for a &quot;new&quot; tag to be floated above certain pictures that have the specific taxonomy term of &quot;new&quot;.  I created a view for the &quot;new&quot; where I added an empty div below the image and then floated it above the image and added the actual &quot;new&quot; image with CSS.  This is what it looks like
For the &quot;new&quot; node.tpl.php the code looks like this:
&lt;article class=&quot;node-&lt;?php print $node-&gt;nid; ?&gt; 
&lt;?php print $classes; ?&gt; clearfix&quot;&lt;?php print $attributes; ?&gt;&gt;
&lt;div id=&quot;new-intro&quot;&gt;&lt;?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
print render($content);
?&gt;

&lt;?php print render($content['links']); ?&gt;&lt;/div&gt;

&lt;?php print render($content['comments']); ?&gt;

&lt;/article&gt;

The id=&quot;new-intro&quot; is the code that adds the background image to the empty div and places it above the product image.  So what I need is a code that automatically adds the id=&quot;new-intro&quot; based on whether the product has the taxonomy term of &quot;new&quot;
I've found quite a few PHP samples but my knowledge is fairly limited and so I'm not sure that I'm editing them properly.
Can any one point me in the right direction??
Thanks so much!!
Edit:
So using the code below my code looks like this:
template.php:
function hayfield_preprocess_node(&amp;$vars) {
  $node = $vars['node'];
  $vars['new_introduction'] = FALSE;
  if ($terms = field_get_items('node', $node, $field_new_introduction)) {
    foreach ($terms as $term) {
      if ($term['tid'] == 'new') {
        $vars['new_introduction'] = t('!published' == TRUE');
      }
    }
  }
}

and the node code looks like this:
&lt;article class=&quot;node-&lt;?php print $node-&gt;nid; ?&gt; &lt;?php print $classes; ?&gt; clearfix&quot;&lt;?php print $attributes; ?&gt;&gt;

  &lt;div &lt;?php if ($new_introduction): ?&gt; &lt;?php print 'class=&quot;new-intro&quot;' ?&gt; &lt;?php endif; ?&gt;&gt;&lt;?php
    // We hide the comments and links now so that we can render them later.
    hide($content['comments']);
    hide($content['links']);
    print render($content);
  ?&gt;

  &lt;?php print render($content['links']); ?&gt;&lt;/div&gt;

  &lt;?php print render($content['comments']); ?&gt;

&lt;/article&gt;

But it's throwing major errors :
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /Users/Candace Morgan 2/Sites/hayfield/sites/all/themes/hayfield/template.php on line 33
(it doesn't like my argument in the last line of the template.php)
Fatal error: Cannot access empty property in /Users/Candace Morgan 2/Sites/hayfield/modules/field/field.module on line 936
the Content type is product_display, the field in the content type is field_new_introduction, the taxonomy vocabulary name is new and the taxonomy term name I want to reference is New Introduction.
I'm yanking my hair out on this one!!  Thank you for any help you can give me!!
Put this into your themes:

function THEMENAME_preprocess_node(&amp;$vars) {
  $node = $vars['node'];
  $vars['new'] = FALSE;
  if ($terms = field_get_items('node', $node, $FIELD_NAME_OF_YOUR_TERM_FIELD_IN_NODE)) {
    foreach ($terms as $term) {
      if ($term['tid'] == THE_TERM_ID_OF_THE_NEW_TERM) {
        $vars['new'] = t('Maybe you can add something new text or simple set it TRUE');
      }
    }
  }
}


Then empty the theme_registry (clear caches) and change the &lt;div id="new-intro"&gt; to:

  &lt;?php if ($new): ?&gt;
    &lt;span class="new-intro"&gt;&lt;?php print $new ?&gt;&lt;/span&gt;
  &lt;?php endif; ?&gt;


Using the same ID in one page is not valid. Then you can target using CSS styles.