-
Notifications
You must be signed in to change notification settings - Fork 1
/
feat-cats.php
123 lines (98 loc) · 3.09 KB
/
feat-cats.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
<div class="white_box">
<div class="mastheader">
<p class="heavy">Top Categories</p>
<ul class="unstyled">
<li id="electronics" class="active-slide">Electronics</li>
<li id="robotics">Robotics</li>
<li id="tools">Tools</li>
<li id="toys">Toys</li>
</ul>
</div>
<div id="slideshow">
<?php
// The Query
$the_query = new WP_Query( 'category_name=electronics-and-controllers&posts_per_page=4' ); ?>
<ul class="unstyled feature_box electronics " >
<?php
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<li><a href="';
the_permalink();
echo '">';
the_post_thumbnail('feat-cat-thumb');
the_title('<p class="overlay transparent">', '</p></a>');
$string = get_the_excerpt();
$brackets = array(' [',']');
echo '<p class="blurbish">'.str_replace($brackets, '', $string).'</p><p><a href="'. get_permalink() .'" class="label important">Read more →</a></p>';
echo '</li>';
endwhile;
// Reset Post Data
wp_reset_postdata();
echo '</ul>';
?>
<?php
// The Query
$the_query = new WP_Query( 'category_name=robotics&posts_per_page=4' ); ?>
<ul class="unstyled feature_box robotics" >
<?php
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<li><a href="';
the_permalink();
echo '">';
the_post_thumbnail('feat-cat-thumb');
the_title('<p class="overlay transparent">', '</p></a>');
$string = get_the_excerpt();
$brackets = array(' [',']');
echo '<p class="blurbish">'.str_replace($brackets, '', $string).'</p><p><a href="'. get_permalink() .'" class="label important">Read more →</a></p>';
echo '</li>';
endwhile;
// Reset Post Data
wp_reset_postdata();
echo '</ul>';
?>
<?php
// The Query
$the_query = new WP_Query( 'category_name=tools-workshop&posts_per_page=4' ); ?>
<ul class="unstyled feature_box tools" >
<?php
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<li><a href="';
the_permalink();
echo '">';
the_post_thumbnail('feat-cat-thumb');
the_title('<p class="overlay transparent">', '</p></a>');
$string = get_the_excerpt();
$brackets = array(' [',']');
echo '<p class="blurbish">'.str_replace($brackets, '', $string).'</p><p><a href="'. get_permalink() .'" class="label important">Read more →</a></p>';
echo '</li>';
endwhile;
// Reset Post Data
wp_reset_postdata();
echo '</ul>';
?>
<?php
// The Query
$the_query = new WP_Query( 'category_name=toys-games&posts_per_page=4' ); ?>
<ul class="unstyled feature_box toys" >
<?php
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<li><a href="';
the_permalink();
echo '">';
the_post_thumbnail('feat-cat-thumb');
the_title('<p class="overlay transparent">', '</p></a>');
$string = get_the_excerpt();
$brackets = array(' [',']');
echo '<p class="blurbish">'.str_replace($brackets, '', $string).'</p><p><a href="'. get_permalink() .'" class="label important">Read more →</a></p>';
echo '</li>';
endwhile;
// Reset Post Data
wp_reset_postdata();
echo '</ul>';
?>
</div>
</div>
<div class="clear"></div>