-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-branches.php
95 lines (90 loc) · 3.78 KB
/
template-branches.php
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/*
* Template Name: Sucursales
*
*/
get_header();
?>
<!-- MAIN CONTENT -->
<div id="main-content" class="stores-main-content">
<?php if(false): //Seccion de productos deprecada?>
<!--PRODUCTS SECTION-->
<div class="container archive-page">
<?php
$products_query = new WP_Query(array(
'post_type' => 'pedigree_product',
'orderby' => 'date',
));
?>
<?php if( $products_query->have_posts() ): ?>
<?php
// =====================================================================
// FILTERS
// =====================================================================
require_once get_template_directory() . '/inc/rb-wordpress-framework/filter/rb-filter.php';
$pedigree_filter = pedigree_get_products_filter();
$pedigree_filter->render();
?>
<div class="related-posts products-list-boxes">
<div class="row">
<?php while ( $products_query->have_posts() ) : $products_query->the_post(); ?>
<?php pedigree_product_prev_box( $post->ID, array('show_info_button' => false)); ?>
<?php endwhile; // end of the loop. ?>
</div>
</div>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<!-- PURCHASE SECTION -->
<?php $stores_links = pedigree_get_stores_links(); ?>
<div id="purchase-options" class="container">
<div class="row justify-content-center">
<?php if( is_array($stores_links) && !empty($stores_links) ): ?>
<!-- ONLINE SHOPS -->
<div class="col-12 col-md-6 section-buy-online">
<div class="sec-header">
<h2 class="title">Comprar Online</h2>
<p>Elegí una de las tiendas para comprar online</p>
</div>
<?php print_stores_logos( $stores_links ); ?>
</div>
<?php endif; ?>
<!-- MAP -->
<div class="col-12 col-md-6 section-map">
<div class="sec-header"><h2 class="title">Comprar en Tiendas</h2></div>
<div class="content">
<div id="stores-map-tools" class="side-by-side">
<?php pedigree_more_button(array(
'content' => "<input id='map-address-search' type='text' placeholder='INGRESA TU DIRECCIÓN...' autocomplete='off'>",
'classes' => 'full-width nowrap',
'id' => 'search-button',
'faw' => 'fas fa-search',
)); ?>
<?php pedigree_more_button(array(
'text' => 'DETECTAR TU UBICACIÓN',
'classes' => 'full-width nowrap',
'id' => 'geolocation-button',
'faw' => 'fas fa-map-marker-alt',
)); ?>
</div>
<div id="stores-map"></div>
<?php
$form_page_id = get_theme_mod('pedigree-add-store-page', -1);
if( $form_page_id && $form_page_id != -1 ): ?>
<div>
<?php pedigree_more_button(array(
'text' => 'AGREGAR TIENDA',
'classes' => 'full-width nowrap',
'id' => 'addstore-button',
'icon' => false,
'url' => get_permalink($form_page_id),
)); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>