-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxonomy.php
138 lines (119 loc) · 3.32 KB
/
taxonomy.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php get_template_part('templates/page', 'header'); ?>
<?php
$last_tracker_update = get_field('last_tracker_update', 'option');
$formatted_tracker_date = date('M j, Y', $last_tracker_update);
?>
<h4>Last Updated: <?php echo $formatted_tracker_date;?>
<?php if (is_tax('status')) {
echo ' - <em>latest changes are listed first</em>';
}
?>
</h4>
<h6>Read all descriptions carefully, buyer beware. Please see the <a href="/apps">app homepage</a> for info about how we track these apps.</h6>
<br>
<?php if (!have_posts()) : ?>
<div class="alert alert-warning">
<?php _e('Sorry, no results were found.', 'sage'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<ul class="tax-page-ul">
<?php while (have_posts()) : the_post(); ?>
<?php
$url = wp_get_attachment_url( get_post_thumbnail_id($id) );
$sizes = get_intermediate_image_sizes();
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( get_post_thumbnail_id($id), $size );
}
?>
<li>
<a href="<?php the_permalink(); ?>">
<img src="<?php
if ($images[0][0] == false ) {
echo '/wp-content/uploads/STR/genericPostPhoto.png';
}
else {
echo $images[0][0];
}
?>" />
<?php
if (has_term('Version Update', 'status')) {
if ( has_term('Price Drop', 'status') ) {
echo '<div class="app-sticky green version-update">';
}
else if ( has_term('Price Bump', 'status') ) {
echo '<div class="app-sticky red version-update">';
}
else {
echo '<div class="app-sticky version-update">';
}
}
else {
if ( has_term('Price Drop', 'status') ) {
echo '<div class="app-sticky green">';
}
else if ( has_term('Price Bump', 'status') ) {
echo '<div class="app-sticky red">';
}
else {
echo '<div class="app-sticky">';
}
}
?>
<?php
$price = get_field('price');
if ( $price == '0' ) {
echo 'FREE';
}
else {
echo '$';
echo $price;
}
?>
</div>
<?php the_title(); ?>
</a>
</li>
<!-- <div class="container col-sm-6">
<div class="col-xs-4">
<?php
// echo '<a href="';
// the_permalink();
// echo '">';
// echo the_post_thumbnail( 'thumbnail' );
// echo '</a>';
// ?>
// </div>
// <div class="col-xs-8">
// <?php
// echo '<a href="';
// the_permalink();
// echo '">';
// echo '<h2>'; echo the_title(); echo '</h2>';
// echo '</a>';
// $price_rows = get_field('price_repeater');
// $price_row_count = count($price_rows);
// // var_dump($price_row_count);
// if( have_rows('price_repeater') ):
// $last_row = $price_row_count - 1;
// $second_to_last_row = $price_row_count - 2;
// echo '<h2><i class="fa fa-arrow-down"></i> '; echo $price_rows[$last_row]['repeater_price']; echo '</h2>';
// echo 'was '; echo $price_rows[$second_to_last_row]['repeater_price'];
// else :
// endif;
?>
</div>
</div>row-->
<?php endwhile; ?>
</ul>
<?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
<?php wp_pagenavi(); // Use PageNavi ?>
<?php } else { // Otherwise, use traditional Navigation ?>
<div class="nav-previous">
<!-- next_post_link -->
</div>
<div class="nav-next">
<!-- previous_post_link -->
</div>
<?php } // End if-else statement ?>