-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-car.php
80 lines (64 loc) · 2.29 KB
/
archive-car.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
<?php
/**
* Cars archive
*
*
* @package FoundationPress
* @subpackage Cars
* @since FoundationPress 1.0.0
*/
get_header();
?>
<div id="page" role="main" class="car-list-wrapper">
<form class="car-filter-form">
<input type="hidden" name="orderby" value="date" />
<input type="hidden" name="page" value="1" />
<div class="row">
<div class="columns small-12 large-6 ordering">
<label><?php _e('Zoradené'); ?>:</label>
<button type="button" name="button" class="active" data-name="orderby" data-value="date">Od najnovšieho</button>
<button type="button" name="button" data-name="orderby" data-value="title">Abecedne</button>
<button type="button" name="button" data-name="orderby" data-value="mileage">Podľa km</button>
</div>
<div class="columns small-12 large-6">
<div class="row">
<div class="columns small-12 large-6">
<label>
<?php _e('Vyberte rok'); ?>:
<select name="year">
<option value="all" selected="selected">všetky</option>
<?php foreach (get_terms(array('taxonomy' => 'year', 'hide_empty' => false)) as $term): ?>
<option value="<?php echo $term->term_id; ?>"><?php echo $term->name; ?></option>
<?php endforeach; ?>
</select>
</label>
</div>
<div class="columns small-12 large-6">
<label>
<?php _e('Vyberte výrobcu'); ?>:
<select name="manufacturer">
<option value="all" selected="selected">všetci</option>
<?php foreach (get_terms(array('taxonomy' => 'manufacturer', 'hide_empty' => false)) as $term): ?>
<option value="<?php echo $term->term_id; ?>"><?php echo $term->name; ?></option>
<?php endforeach; ?>
</select>
</label>
</div>
</div>
</div>
</div>
</form>
<?php if (have_posts()) : ?>
<article class="row medium-uncollapse" data-equalizer data-equalize-by-row="true">
<?php get_template_part('template-parts/content', 'car-template'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('template-parts/content', 'car'); ?>
<?php endwhile; ?>
</article>
<div class="row">
<a class="expanded button load-more" href="#"><?php _e('zobraziť ďalšie', 'foundationpress'); ?></a>
</div>
<?php endif; // End have_posts() check. ?>
</div>
<?php
get_footer();