sidebar.php
3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php $get_lang = isset($wp_query->query_vars['prisna_translate_seo_request'])?urldecode($wp_query->query_vars['prisna_translate_seo_request']):''; ?>
<aside class="aside wow fadeInLeft">
<section class="aside-wrap">
<section class="side-widget side-product-list">
<div class="side-tit-bar">
<h4 class="side-tit">product categories</h4>
</div>
<div class="side-cate side-hide">
<ul class="side-cate-menu">
<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 4, 'echo' => false)) ));?>
</ul>
</div>
</section>
<?php if(is_home()) : ?><?php else: ?><section class="side-widget side-products">
<div class="side-tit-bar">
<h4 class="side-tit">FEATURE PRODUCTS</h4>
</div>
<div class="side-cont side-hide products-scroll-list-wrap"> <a href="javascript:" class="products-scroll-btn-prev"><b></b></a>
<div class="products-scroll-list">
<ul>
<?php $args = array('showposts' => 18, '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>
<a href="<?php the_permalink() ?>"><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>
<div class="pd-info">
<div class="pd-name"><a href="<?php the_permalink() ?>"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title',$post->post_title)), 0, 55,"..."); ?></a></div>
</div>
</li>
<?php endwhile; endif; wp_reset_query(); ?>
</ul>
</div>
<a href="javascript:" class="products-scroll-btn-next"><b></b></a>
</div>
</section><?php endif; ?>
<!-- <section class="side-widget">
<div class="side-tit-bar">
<h4 class="side-tit">Categories</h4>
</div>
<div class="side-cate side-hide">
<ul class="side-cate-menu">
<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 70, 'echo' => false)) ));?>
</ul>
</div>
</section>
-->
<?php $images = get_get_field('ad_sidebar_banner'); if( $images ): foreach( $images as $image ): ?>
<div class="side-bn"><a href="<?php echo $image['alt']; ?>"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['description']; ?>" /></a></div>
<?php endforeach; endif; ?>
</aside>