-
Notifications
You must be signed in to change notification settings - Fork 1
/
loop.php
144 lines (126 loc) · 5.98 KB
/
loop.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
137
138
139
140
141
142
143
144
<!--
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous">{{ site.next_posts_link('<span class="meta-nav">←</span> Older posts') }}</div>
<div class="nav-next">{{ site.previous_posts_link('Newer posts <span class="meta-nav">→</span>') }}</div>
</div>
<?php endif; ?>
-->
{% if posts %}
{% for post in posts %}
{% if post.format == "gallery" %}
<div id="post-{{ post.id }}" {{ site.post_class() }}>
<h2 class="entry-title"><a href="{{ site.post.permalink }}" title="Permalink to {{ site.post.post_title }}" rel="bookmark">{{ post.post_title }}</a></h2>
<div class="entry-meta">
<span class="meta-prep meta-prep-author">Posted on</span>
<a href="{{ post.permalink }}" title="{{ post.post_date|date("h:i") }}" rel="bookmark"><span class="entry-date">{{ post.post_date|date("d/M/Y") }}</span></a>
<span class="meta-sep">by</span>
<span class="author vcard"><a class="url fn n" href="{{ post.author.url }}" title="View all posts by {{ post.author.name }}">{{ post.author.name }}</a></span>
</div>
<div class="entry-content">
<!--
<?php
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
?>
<div class="gallery-thumb">
<a class="size-thumbnail" href="{{ post.permalink }}"><?php echo $image_img_tag; ?></a>
</div><!-- .gallery-thumb -->
<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
'href="' . get_permalink() . '" title="' . sprintf('Permalink to %s', the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
); ?></em></p>
<?php endif; ?>
-->
{{ post.excerpt }}
</div>
<div class="entry-utility">
<a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="View Galleries">More Galleries</a>
<span class="meta-sep">|</span>
<span class="comments-link">{{ site.comments_popup_link('Leave a comment', '1 Comment', '% Comments') }}</span>
<span class="meta-sep">|</span>
<span class="edit-link">{{ post.links.edit }}</span>
</div>
</div>
{% elseif post.format == "aside" %}
<div id="post-{{ post.id }}" {{ site.post_class() }}>
{% if request.is_archive or request.is_search %}
<div class="entry-summary">
{{ post.excerpt }}
</div>
{% else %}
<div class="entry-content">
{{ post.content }}
</div>
{% endif %}
<div class="entry-utility">
<span class="meta-prep meta-prep-author">Posted on</span>
<a href="{{ post.permalink }}" title="{{ post.date|date("h:i") }}" rel="bookmark"><span class="entry-date">{{ post.date|date("d/M/Y") }}</span></a>
<span class="meta-sep">by</span>
<span class="author vcard"><a class="url fn n" href="{{ post.author.url }}" title="View all posts by {{ post.author.name }}">{{ post.author.name }}</a></span>
<span class="meta-sep">|</span>
<span class="comments-link">{{ site.comments_popup_link('Leave a comment', '1 Comment', '% Comments') }}</span>
<span class="meta-sep">|</span>
<span class="edit-link">{{ post.links.edit }}</span>
</div>
</div>
{% else %}
<div id="post-{{ post.id }}" {{ site.post_class() }}>
<h2 class="entry-title"><a href="{{ post.permalink }}" title="Permalink to {{ post.title }}" rel="bookmark">{{ post.post_title }}</a></h2>
<div class="entry-meta">
<span class="meta-prep meta-prep-author">Posted on</span>
<a href="{{ post.permalink }}" title="{{ post.date|date("h:i") }}" rel="bookmark"><span class="entry-date">{{ post.date|date("d/M/Y") }}</span></a>
<span class="meta-sep">by</span>
<span class="author vcard"><a class="url fn n" href="{{ post.author.url }}" title="View all posts by {{ post.author.name }}">{{ post.author.name }}</a></span>
</div>
{% if site.is_archive or site.is_search %}
<div class="entry-summary">
{{ post.post_excerpt }}
</div>
{% else %}
<div class="entry-content">
{{ post.post_content }}
{{ site.wp_link_pages({'before' : '<div class="page-link">Pages:', 'after' : '</div>'}) }}
</div>
{% endif %}
<div class="entry-utility">
{% if site.get_the_category_list() %}
<span class="cat-links">
<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> {{ site.get_the_category_list( ', ' ) }}
</span>
<span class="meta-sep">|</span>
{% endif %}
{% if site.get_the_tag_list( '', ', ' ) %}
<span class="tag-links">
<span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> {{ site.get_the_tag_list() }}
</span>
<span class="meta-sep">|</span>
{% endif %}
<span class="comments-link">{{ site.comments_popup_link('Leave a comment', '1 Comment', '% Comments') }}</span>
<span class="meta-sep">|</span>
<span class="edit-link">{{ post.links.edit }}</span>
</div>
</div>
{% include "comments.php" %}
{% endif %}
{% endfor %}
{% else %}
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title">Not Found</h1>
<div class="entry-content">
<p>Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.</p>
{#{ site.search }#}
</div>
</div>
{% endif %}
<!--
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"> {{ site.next_posts_link('<span class="meta-nav">←</span> Older posts') }}</div>
<div class="nav-next">{{ site.previous_posts_link('Newer posts <span class="meta-nav">→</span>') }}</div>
</div>
<?php endif; ?>
-->