<?php global $smof_data; $newsticker_cat = $smof_data['newsticker_cat']; ?>
<?php $newsticker_count = $smof_data['newsticker_count']; ?>
<?php $category_id = get_cat_ID($newsticker_cat); ?> 
<div class="ticker-section">
  <div class="content-wrap ">
    <div class="ticker container" style="display: block;">
      <div class="title second-color-bg ">
        <div class="ticker-icon"> <i class="icon-rocket"></i> </div>
        <h6><?php _e('Breaking News','lioit')?></h6>
      </div>
      <div class="tickercontainer">
        <div class="mask">
          <ul id="ticker-posts" class="newsticker">
          	<?php query_posts(array('showposts' => $newsticker_count, 'cat' => $category_id )); ?>
            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <li> <?php 
											$badge_text = get_post_meta($post->ID, 'lioit_post_badge_text', true);
											$badge_color = get_post_meta($post->ID, 'lioit_post_badge_color', true);
										?>
                                        <?php if ($badge_text) { ?>
                                        <div class="articleType" style="background-color:<?php echo $badge_color; ?>;"><?php echo $badge_text; ?></div>
                                        <?php } ?>
                                        <a href="<?php the_permalink();?>"><?php the_title(''); ?> ...</a>
             
            </li>
            <?php endwhile; ?>
			<?php  else:  ?>
            <!-- Else in here -->
            <?php  endif; ?>
            <?php wp_reset_query(); ?>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>
