I have this loop:
<?php while (have_posts()) : the_post(); ?>
<li><h2 class="titles"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2></li>
<li><span class="post-date">Posted <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></span><span class="post-cat">Filed under: <?php the_category(', ') ?> by <?php the_author(); ?></span></li>
<li><p><?php the_excerpt(); ?></p></li>
<div class="voting"><?php DisplayVotes(get_the_ID()); ?></div>
<?php endwhile;?>
I only want to put this line <div class="voting"><?php DisplayVotes(get_the_ID()); ?></div> in only if the loop is referencing a certain category, ie. if (category== ‘birthdays’) then output this line.
I know how to do an if statement but what condition do i put in?
Use get_the_category function