-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
64 lines (39 loc) · 1.54 KB
/
content.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
<article>
<div <?php post_class(); ?>>
<?php if (has_post_thumbnail()): ?>
<?php if (!is_single()): ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<?php endif; ?>
<?php if (is_single()): ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
<?php endif; ?>
<h1 class="post-h1">
<?php if (is_single()): ?>
<?php echo (the_title('', '', false) == '' ? 'Read More' : the_title('', '', false)); ?>
<?php endif; ?>
<?php if (!is_single()): ?>
<a href="<?php the_permalink(); ?>">
<?php echo (the_title('', '', false) == '' ? 'Read More' : the_title('', '', false)); ?>
</a>
<?php endif; ?>
</h1>
<div class="date muted-text"><?php echo get_the_date(); ?></div>
<?php if (is_archive() || is_search()) : // Only display excerpts for archives and search. ?>
<div class="post-text">
<?php the_excerpt(); ?>
</div>
<?php else : ?>
<div class="post-text">
<?php the_content('Read More'); ?>
<?php edit_post_link('(Edit)', '', ''); ?>
</div>
<?php if (is_single()) : ?>
<div class="link-pages">
<?php wp_link_pages(); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php rebar_post_meta(); ?>
</div>
</article>