-
Notifications
You must be signed in to change notification settings - Fork 0
/
location.php
53 lines (51 loc) · 1.98 KB
/
location.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
<?php get_header(); ?>
<h1><?php single_cat_title(); ?></h1>
<?php
if ( category_description() ) :
echo category_description();
else :
?>
<p>You are currently viewing the location <strong><?php single_cat_title(); ?></strong>. This tag lacks a fancy description, because:</p>
<ul>
<li>It's a home location.</li>
<li>We haven't gotten around to it yet because it's new.</li>
</ul>
<?php endif; ?>
<div class="post--box">
<?php if ( have_posts() ) :
$postCount = 0;
while ( have_posts() ) :
the_post();
$image = get_first_image();
$postCount++;
?>
<article class="post--listing" itemscope itemtype="http://schema.org/BlogPosting">
<img src="<?php echo $image; ?>" alt="Featured image for <?php echo the_title(); ?>">
<h2 itemprop="name"><a href="<?php echo get_permalink(); ?>" rel="bookmark" itemprop="url"><?php echo the_title(); ?></a></h2>
<time aria-label="Time stamp of blog post" datetime="<?php echo get_the_date('Y-m-d'); ?>T<?php echo get_the_date('H:iP'); ?>" itemprop="datePublished"><?php
if ( $postCount == 1 && !is_paged() ) :
echo 'Latest post</time>';
else :
echo the_time('n.d.y');
?></time><?php endif; ?>
<meta itemprop="author" content="<?php the_author(); ?>">
<meta itemprop="inLanguage" content="en">
<meta itemprop="copyrightYear" content="<?php the_time('Y'); ?>">
<meta itemprop="commentCount" content="<?php echo get_comments_number(); ?>">
<meta itemprop="url" content="<?php echo get_permalink(); ?>">
<meta itemprop="wordCount" content="<?php echo wordcount(); ?>">
</article>
<?php endwhile; ?>
</div><!-- post--box -->
<?php if (get_next_posts_link() || get_previous_posts_link()) :
echo '<nav class="pagination">';
next_posts_link('Older posts »');
previous_posts_link('« Newer posts');
echo '</nav>';
endif;
endif; ?>
</div><!-- body__main -->
</section>
<?php
get_footer();
?>