-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-home-gallery.php
62 lines (54 loc) · 1.41 KB
/
content-home-gallery.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
<?php
/**
* Template for home gallery russell content large.
* @package russell
*/
$posts = russell_large_content();
?>
<div class="russell-gallery-left">
<?php
foreach ( $posts as $i => $post ) {
if ( ! empty( $post['categories'] ) ) {
$link = '';
if ( $i < count( $post ) ) {
?><div class="gallery-image"><?php
echo '<span class="image-title">' . $post['title'] . '</span>';
echo '<a href="' . $post['link'] . '"><img src="' . $post['image'] . '"></a>';
echo "<ul class='russell-catlist'>";
foreach ( $post['categories'] as $category ) {
$id = get_cat_ID( $category );
$link = get_category_link( $id );
$a = explode( ', ', $category );
foreach ( $a as $b ) {
echo '<li><a href=' . $link . '>' . $b . '</a></li>';
}
}
echo '</ul>';
?></div><?php
}
}
}
?>
</div>
<div class="russell-gallery-right">
<?php
foreach ( $posts as $i => $post ) {
if ( $i > count( $post ) ) {
?><div class="gallery-image"><?php
echo '<span class="image-title">' . $post['title'] . '</span>';
echo '<a href="' . $post['link'] . '"><img src="' . $post['image'] . '"></a>';
echo "<ul class='russell-catlist'>";
foreach ( $post['categories'] as $category ) {
$id = get_cat_ID( $category );
$link = get_category_link( $id );
$a = explode( ', ', $category );
foreach ( $a as $b ) {
echo '<li><a href=' . $link . '>' . $b . '</a></li>';
}
}
echo '</ul>';
?></div><?php
}
}
?>
</div>