<?php
if ( myarcadetheme_get_option( 'slider_header' ) ) {
  $categories = myarcadetheme_get_option( 'categories_sliderhd' );
  $category_in = '';
  if ( !empty($categories) ) {
    $categories = implode(",", $categories );
    $category_in = 'cat=' . $categories;
  }

  $query = new WP_Query( $category_in.myarcadetheme_mobile_tag().'&posts_per_page='.myarcadetheme_get_option( 'sortable_sliderhd', 20 ) );

  if ( $query->have_posts() ) {
    ?>
    <div class="hdcn-4">
      <div class="cont">
        <div class="mt-bx-loading"></div>
        <div class="hdgms-cn" style="visibility:hidden">
          <ul class="sldr-hd">
            <?php
            while ($query->have_posts()) :
              $query->the_post();
            ?>
            <!--<game>-->
            <li>
              <div class="gmcn-smal">
                <figure class="gm-imag"><a href="<?php the_permalink(); ?>" itemprop="url"><?php myarcade_thumbnail( array( 'width' => 60, 'height' => 60, 'lazy_load' => false ) ); ?><span class="fa-gamepad"><?php printf( __('%sPLAY%s %sNOW!%s', 'myarcadetheme'), '<strong>', '</strong>', '<span>', '</span>'); ?></span></a></figure>
                <div class="gm-titl" itemprop="name"><a href="<?php the_permalink(); ?>" itemprop="url"><?php myarcade_title(25); ?></a></div>

               <?php myarcadetheme_rate_and_view(); ?>
              </div>
            </li>
            <!--</game>-->
            <?php
            endwhile;
            ?>
          </ul>
        </div>
      </div>
    </div>
    <?php
    wp_reset_query();
  }
}
?>