-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-post.php
54 lines (49 loc) · 1.87 KB
/
content-post.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
<?php global $theme; ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if (!is_single() || is_search()): ?>
<h2>
<a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr__('Permalink to %s', 'rockharbor'), the_title_attribute('echo=0')); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<?php endif; ?>
<div class="entry-meta clearfix">
<?php
$theme->set('pubdate', true);
$theme->set('date', $post->post_date);
echo $theme->render('posted_date');
?>
<span class="author">By: <?php echo get_the_author_link(); ?></span>
<span class="tags">Posted in <?php the_category(', ') . the_tags(' | ', ', '); ?></span>
<?php if (!is_single() || is_search()): ?>
<span class="comments-link"><?php comments_popup_link('<span class="leave-reply">' . __('Leave a reply', 'rockharbor') . '</span>', __('<b>1</b> Reply', 'rockharbor'), __('<b>%</b> Replies', 'rockharbor')) ?></span>
<?php endif; ?>
</div>
<?php if (has_post_thumbnail() && (!is_single() || is_search())): ?>
<div class="entry-image">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('thumbnail'); ?>
</a>
</div>
<?php endif; ?>
<div class="entry-content clearfix">
<?php the_content(__('Read More', 'rockharbor')); ?>
<?php echo $theme->render('pagination_posts'); ?>
</div>
<?php
global $more;
if ($more) {
$theme->set('types', array('post', 'page'));
$related = $theme->render('related_content');
$comments = '';
if (comments_open()) {
// have to capture because wordpress just auto-echoes everything
ob_start();
comments_template('', true);
$comments = ob_get_clean();
$comments = trim(preg_replace('/\s+/', ' ', $comments));
}
if (!empty($related) || !empty($comments)) {
echo $theme->Html->tag('footer', $related.$comments, array('class' => 'related clearfix'));
}
}
?>
</article>