-
Notifications
You must be signed in to change notification settings - Fork 7
/
single-sq_socialpost.php
73 lines (72 loc) · 4.24 KB
/
single-sq_socialpost.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
<?php get_header(); ?>
<section class="main clearfix">
<section class="content" role="main">
<?php
if(have_posts()) : while(have_posts()) : the_post();
$post_format = get_post_format();
if ( $post_format == null ):
$post_format = 'standard';
endif;
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('article clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<header class="article-header">
<?php if( $post_format != 'aside' && $post_format != 'status'): ?>
<h1 title="<?php the_title_attribute(); ?>" itemprop="headline">
<?php echo '<span class="socialpost-type">' . $post_format . ':</span> '; the_title(); ?>
</h1>
<aside class="byline vcard">
Posted <time class="updated" datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time(get_option('date_format')); ?></time> by <span class="author"><?php the_author_posts_link(); ?></span>
</aside>
<?php endif; ?>
</header>
<main class="article-content clearfix" itemprop="articleBody">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
the_content();
?>
<?php if( $post_format == 'aside' || $post_format == 'status'): ?>
<aside class="byline vcard bottom-date">
Posted <time class="updated" datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time(get_option('date_format')); ?></time> by <span class="author"><?php the_author_posts_link(); ?></span>
</aside>
<?php endif; ?>
</main>
<footer class="article-footer">
<section class="categories">
Categories: <?php the_terms( $post->ID, 'sq_socialpost_categories', '', ', ', ' ' ); ?>
</section>
<section class="tags">
<?php the_tags('<span class="tags-title">Tags:</span> ', ', ', ''); ?>
</section>
</footer>
<section class="comments">
<?php comments_template( '/comments.php' ); ?>
</section>
<hr />
</article>
<nav class="paginated-posts">
<?php wp_link_pages(); ?>
</nav>
<?php endwhile; ?>
<?php else : ?>
<article class="post-404">
<header class="article-header">
<h2>
Oops! Post not found.
</h2>
</header>
<section class="article-content clearfix">
Something has gone very, very, VERY wrong. Can you make sure you clicked on the right thing?
</section>
<footer class="article-footer">
<p>
You've gotten this error message from the sidebar.php file in the template.
</p>
</footer>
</article>
<?php endif; ?>
</section>
<?php get_sidebar(); ?>
</section>
<?php get_footer(); ?>