sidebar.php
4.0 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php $get_lang = isset($wp_query->query_vars['prisna_translate_seo_request'])?urldecode($wp_query->query_vars['prisna_translate_seo_request']):''; ?>
<aside class="aside">
<?php if ( $post_type == 'news' | $taxonomy == 'news_catalog') : ?>
<section class="side-widget">
<div class="side-tit-bar">
<h3 class="side-tit">Products Categories</h3></div>
<div class="side-cate side-hide">
<ul>
<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 187, 'echo' => false)) ));?>
</ul>
</div>
</section>
<?php elseif (is_page()) : ?>
<section class="side-widget">
<div class="side-tit-bar">
<h3 class="side-tit">Products Categories</h3></div>
<div class="side-cate side-hide">
<ul>
<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 70, 'echo' => false)) ));?>
</ul>
</div>
</section>
<?php else: ?>
<section class="side-widget">
<div class="side-tit-bar">
<h3 class="side-tit">Products Categories</h3></div>
<div class="side-cate side-hide">
<ul>
<?php echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('menu' => 4, 'echo' => false)) ));?>
</ul>
</div>
</section>
<section class="side-widget side-products">
<div class="side-tit-bar">
<h3 class="side-tit">Feature Products</h3></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; ?>
<div class="side-widget widget widget-contact">
<div class="side-tit-bar">
<h3 class="side-tit">Contact Us</h3>
</div>
<ul class="side-cate side-hide">
<?php if( get_get_field('lianxi_adress') ){ ?><li class="contact-adress">Address: <?php get_the_field('lianxi_adress'); ?></li><?php } ?>
<?php if( get_get_field('lianxi_phone_01') ){ ?><li class="contact-phone">Phone: <?php get_the_field('lianxi_phone_01'); ?></li><?php } ?>
<?php if( get_get_field('lianxi_phone_02') ){ ?><li class="contact-phone">Phone: <?php get_the_field('lianxi_phone_02'); ?></li><?php } ?>
<?php if( get_get_field('lianxi_mail_01') ){ ?><li class="contact-email">E-mail: <a href="javascript:" class="add_email12"><?php get_the_field('lianxi_mail_01'); ?></a></li><?php } ?>
<?php if( get_get_field('lianxi_mail_02') ){ ?><li class="contact-email">E-mail: <a href="javascript:" class="add_email12">"><?php get_the_field('lianxi_mail_02'); ?></a></li><?php } ?>
<?php if( get_get_field('lianxi_fax') ){ ?><li class="contact-fax">Fax: <?php get_the_field('lianxi_fax'); ?></li><?php } ?>
<?php if( get_get_field('lianxi_whatsapp') ){ ?><li class="contact-sky">Whatsapp: <?php get_the_field('lianxi_whatsapp'); ?></li><?php } ?>
</ul>
</div>
<?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>