-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
136 lines (86 loc) · 2.05 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
/*
* standard article output for listings, single and page view
*/
if (is_single()) :
?>
<nav class="ym-contain-dt no-margin">
<h4 class="ym-hideme"><?php _e('Article navigation', 'sunlix'); ?></h4>
<?php previous_post_link("%link", "← %title"); ?>
<?php next_post_link("%link", "%title →"); ?>
</nav>
<?php
endif
?>
<article>
<header>
<?php
if (is_single() || is_page()) :
?>
<h3>
<?php the_title(); edit_post_link(__("Edit"), ' <span class="warning">// ', "</span>") ?>
</h3>
<?php
else :
?>
<h4>
<a href="<?php the_permalink() ?>" title="<?php printf(__('Read article %1$s', 'sunlix'), '„'. get_the_title() .'“') ?>"><?php the_title() ?></a>
</h4>
<?php
endif
?>
</header>
<div class="ym-contain-dt entry">
<?php
if (is_single() || is_page()) :
the_content();
else :
the_excerpt();
endif;
wp_link_pages();
?>
</div>
<?php
if (!is_page()) :
?>
<footer>
<div class="ym-contain-dt author">
<small>
<?php
printf(__('Published by %1$s on %2$s in %3$s', 'sunlix'),
'<a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'))) .'" title="'. esc_attr(sprintf(__('View all articles by %1$s', 'sunlix'), get_the_author())) .'">'. get_the_author() .'</a>',
esc_html(get_the_time(get_option("date_format"))),
get_the_category_list(", ")
);
?>
</small>
</div>
<p class="ym-contain-dt social">
<a class="btn comment" href="<?php comments_link() ?>" title="<?php printf(__('Comment the article %1$s', 'sunlix'), '„'. get_the_title() .'“') ?>">
<span>
<?php _e("Comments") ?>
</span>
<span>
<span><?php comments_number("0", "1", "%") ?></span>
</span>
</a>
</p>
</footer>
<?php
endif;
if (is_single()) :
comments_template();
endif
?>
</article>
<?php
if (is_single()) :
?>
<nav class="ym-contain-dt">
<h4 class="ym-hideme"><?php _e('Article navigation', 'sunlix'); ?></h4>
<?php previous_post_link("%link", "← %title"); ?>
<?php next_post_link("%link", "%title →"); ?>
</nav>
<?php
endif
?>