index.php 5.1 KB
<?php $get_lang = isset($wp_query->query_vars['prisna_translate_seo_request'])?urldecode($wp_query->query_vars['prisna_translate_seo_request']):''; ?>
<?php get_header();?>
<section class="web_main index_main">
  <!-- banner -->
  <div class="slider_banner">
    <div class="swiper-wrapper">
      <?php $images = get_get_field('ad_index_banner'); if( $images ): foreach( $images as $image ): ?>
      <div class="swiper-slide"> <a href="<?php echo $image['alt']; ?>"> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['title']; ?>"/></a></div>
      <?php endforeach; endif; ?>
    </div>
    <div class="swiper-pagination swiper-pagination-white"></div>
    <div class="swiper-button-next swiper-button-white"></div>
    <div class="swiper-button-prev swiper-button-white"></div>
  </div>
  <section class="index_classification_warp">
      <div class="index_title_bar wow fadeInUpA">
        <h2 class="title">classification</h2>
      </div>
      <ul class="classificate_items layout">
       <?php $i=1; $images = get_get_field('ad_ico01'); if( $images ): foreach( $images as $image ): ?>
        <li class="classificate_item wow flipInX">
          <figure><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['title']; ?>">
            <figcaption>
              <h4 class="classificate_tit"> <a href="<?php echo $image['alt']; ?>" class="title"><?php echo $image['title']; ?></a> <a href="<?php echo $image['alt']; ?>" class="classificate_more"> more>> </a> </h4>
              <div class="classificate_text"><?php echo $image['description']; ?></div>
            </figcaption>
          </figure>
        </li>
 <?php  $i++; endforeach; endif; ?>
      </ul>
    </section>
  <section class="index_product_wrap" style="background-image:url(<?php echo home_url("/"); ?>style/global/img/demo/product_bg.jpg)">
      <div class="layout">
        <div class="index_title_bar wow fadeInUpA">
          <h2 class="title">Featured Products</h2>
        </div>
        <ul class="product_items swiper-wrapper">
        <?php $args = array('showposts' => 12, 'post_type' => 'post', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'special','value' => 'Feature Products','compare' => 'LIKE')));

$the_query = new WP_Query( $args );$i=1; if( $the_query->have_posts() ): while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
          <li class="product_item swiper-slide wow flipInY">
            <figure> <span class="item_img"> <img src="<?php $images = get_field('product_gallery'); if( $images ): for($x=0;$x<1; $x++){ ?><?php echo $images[0]['sizes']['thumbnail']; ?><?php } endif; ?>" alt="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?>"/><a href="<?php the_permalink() ?>" class="img_shadow"></a></span>
              <figcaption>
                <h3 class="item_title"><a href="<?php the_permalink() ?>"><span><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 50,"..."); ?></span></a></h3>
              </figcaption>
            </figure>
          </li>
     <?php $i++; endwhile; endif;  wp_reset_query(); ?>  
        </ul>
        <div class="swiper-pagination swiper-pagination-white"></div>
      </div>
    </section>
    <section class="index_about_wrap">
      <div class="index_title_bar wow fadeInUpA">
        <h2 class="title">about us</h2>
      </div>
      <div class="layout">
        <div class="about_banner wow fadeInUpA"> <a href=""> <img src="template/img/demo/about_01.jpg" alt=""/></a> </div>
        <div class="about_text wow fadeInUpA"><?php get_the_field('about_text'); ?></div>
        <a href="<?php echo home_url("/"); ?>about-us/" class="about_more wow fadeInUpA">more>></a> </div>
    </section>
    <section class="Index_Lastest_News">
      <div class="index_title_bar wow fadeInUpA">
        <h2 class="title">lastes news</h2>
      </div>
      <div class="index_news_bg">
        <ul class="Lastest_News_Items layout">
         <?php query_posts(array( 'post_type' => 'news','showposts' => 5,'orderby' => 'post_date','order'=> 'DESC') ); while (have_posts()) : the_post();?>
          <li class="news_item wow flipInY">
            <figure> <span class="news_img"><a href="<?php echo $get_lang?home_url('/')  .$get_lang.'/news/' . $post->post_name:home_url('/') .'news/' . $post->post_name ; ?>"><?php $image = get_field('news_img');if( !empty($image) ): ?><img src="<?php echo $image['url']; ?>" alt="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?>"><?php endif; ?></a></span>
              <figcaption>
                <div class="news_date"><?php the_time('y/m/d') ?></div>
                <div class="news_text"><a href="<?php echo $get_lang?home_url('/')  .$get_lang.'/news/' . $post->post_name:home_url('/') .'news/' . $post->post_name ; ?>"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 44,"..."); ?></a></div>
              </figcaption>
            </figure>
          </li>
          <?php endwhile; wp_reset_query();  ?> 
        </ul>
      </div>
    </section>
</section>
<?php get_footer();?>