index.php 6.3 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();?>
<div class="banner_flexslider">
          <ul class="slides">
           <?php $images = get_get_field('ad_index_banner'); if( $images ): foreach( $images as $image ): ?>
            <li class="item"><a href="<?php echo $image['alt']; ?>"><img  src="<?php echo $image['url']; ?>" alt="<?php echo $image['title']; ?>"/></a></li>
             <?php endforeach; endif; ?>
          </ul>
        </div>
<section class="layout main_content">
<div class="gm-sep company_info">
 <div class="about_us">
    	<div class="about_video"><?php get_the_field('about_sp'); ?></div>
        <div class="about_detail"><?php get_the_field('about_text'); ?></div>
<a href="<?php echo home_url("/"); ?>about-us/" class="read_more">Read more</a>
	
 </div>
 <ul class="gm-sep index_news">
  <?php query_posts(array( 'post_type' => 'news','showposts' => 5,'orderby' => 'post_date','order'=> 'DESC') ); while (have_posts()) : the_post();?>
 	<li class="news_item">
    	<div class="item_wrap">
        	<a class="item_img" href="<?php echo $get_lang?home_url('/')  .$get_lang.'/news/' . $post->post_name:home_url('/') .'news/' . $post->post_name ; ?>"><img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 200,"..."); ?>"></a>
            <h3 class="item_title"><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></h3>
            <div class="item_detail"><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 300,"..."); ?></div>
            <a href="<?php echo $get_lang?home_url('/')  .$get_lang.'/news/' . $post->post_name:home_url('/') .'news/' . $post->post_name ; ?>" class="read_more">Read more</a>
        </div>
    </li>
    <?php endwhile; wp_reset_query();  ?>
 </ul> 
</div>  
  
      
      
    <div class="index-product" >
    	<div class="index-title-bar">
       	 <h2 class="title">Featured Products</h2>
         <span>Curabitur non ante non ligula placerat condimentum in eu est vehicula magna</span>
        </div>
    <ul class="gm-sep product-items" >
           <?php $args = array('showposts' => 8, 'post_type' => 'post', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'special','value' => 'Feature Products','compare' => 'LIKE')));
$the_query = new WP_Query( $args ); if( $the_query->have_posts() ): while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
          <li class="product-item">
          	<div class="wow flipInY item-wrap">
                        <span class="item-img"><a href="<?php the_permalink() ?>" title="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,""); ?>"><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></span>
                        <div class="item-info">
                            <a href="<?php the_permalink() ?>" title="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,""); ?>">
                                <h4 class="item-tit"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 50,"..."); ?></h4>
                                <div class="item-desc">Learn More</div>
                            </a>
                        </div>
                    </div>
          </li>     
          <?php endwhile; endif;  wp_reset_query(); ?>   
           
          </ul>
    </div> 
    <div class="index-product" >
    	<div class="index-title-bar">
       	 <h2 class="title">Arrival Products</h2>
         <span>Curabitur non ante non ligula placerat condimentum in eu est vehicula magna</span>
        </div>
    <ul class="gm-sep product-items" >
            <?php $args = array('showposts' => 12, 'post_type' => 'post', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'special','value' => 'New Arrivals','compare' => 'LIKE')));
$the_query = new WP_Query( $args ); if( $the_query->have_posts() ): while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
          <li class="product-item">
          	<div class="wow flipInY item-wrap">
                        <span class="item-img"><a href="<?php the_permalink() ?>" title="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,""); ?>"><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></span>
                        <div class="item-info">
                            <a href="<?php the_permalink() ?>" title="<?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 300,""); ?>">
                                <h4 class="item-tit"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 50,"..."); ?></h4>
                                <div class="item-desc">Learn More</div>
                            </a>
                        </div>
                    </div>
          </li>     
          <?php endwhile; endif;  wp_reset_query(); ?>     
           
          </ul>
    </div>
    <div class="index-partner">
    	<div class="index-title-bar">
       	 <h2 class="title">partener</h2>
         <span>Curabitur non ante non ligula placerat condimentum in eu est vehicula magna</span>
        </div>
        <ul class="gm-sep partner_items"> <?php $images = get_get_field('ad_hzhb'); if( $images ): foreach( $images as $image ): ?>
        	<li class="partner_item"><div class="wrap"><img  src="<?php echo $image['url']; ?>" alt="<?php echo $image['title']; ?>"/></div></li>
            <?php endforeach; endif; ?>
        </ul>
    </div>    
    
</section>
<?php get_footer();?>