-
Notifications
You must be signed in to change notification settings - Fork 4
/
content-series-first.php
63 lines (62 loc) · 1.74 KB
/
content-series-first.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
<?php
/**
* This template part is special and does not use `$wp_query`, but instead uses
* what's made available in the manual `Message::shortcode()` loop.
*
* This is especially special because it's used only to display the first
* series
*/
global $theme, $post, $item;
$permalink = get_permalink($item->last->ID);
$termlink = get_term_link((int)$item->term_id, 'series');
?>
<article id="post-<?php echo $item->term_id ?>" class="first message-series clearfix">
<div class="entry-content">
<div class="series-image">
<?php
if (has_post_thumbnail($item->last->ID)) {
echo $theme->Html->tag('a', get_the_post_thumbnail($item->last->ID, 'full'), array(
'href' => $permalink,
'title' => $item->last->post_title
));
}
?>
</div>
<div class="series-details">
<h2>
<?php
echo $theme->Html->tag('a', $item->last->post_title, array(
'href' => $permalink,
'title' => $item->last->post_title
));
?>
</h2>
<?php
$date = date('Y-m-d', strtotime($item->last->post_date));
$theme->set('date', $date);
echo $theme->render('posted_date');
?>
<p>
<?php echo $item->last->post_excerpt; ?>
</p>
<p class="series-link-buttons">
<?php
echo $theme->Html->tag('a', '<span class="icon icon-download"></span>Watch This Message', array(
'href' => $permalink,
'title' => $item->last->post_title,
'class' => 'rh-button'
));
?>
<span>or</span>
<?php
echo $theme->Html->tag('a', 'More Messages in "'.$item->name.'"', array(
'href' => $termlink,
'title' => $item->name,
'class' => 'rh-button'
));
?>
</p>
</div>
</div>
</article>
<h1>Past Series</h1>