-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
executable file
·55 lines (45 loc) · 1.8 KB
/
single.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
<?php
/**
* The template for displaying all single posts and attachments
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/
get_header(); ?>
<?php get_template_part( 'template-parts/blog-title-bar' ); ?>
<div id="single-post" class="page-full-width max-width-one-thousand no-sidebar" role="main">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<?php do_action( 'foundationpress_post_before_entry_content' ); ?>
<div class="entry-content">
<?php
if ( has_post_thumbnail() ) { ?>
<div class="single-featured-image">
<?php the_post_thumbnail(); ?>
</div>
<?php } ?>
<?php the_content(); ?>
</div>
<?php $posttags = get_the_tags(); if ($posttags) { ?>
<div class="the-tags">
<?php foreach($posttags as $tag) {
echo '<a href="' . get_bloginfo('url') . '/tag/' . $tag->slug . '"><span class="tag">#' . $tag->slug . '</a></span>';
} ?>
</div>
<?php } ?>
<?php get_template_part( 'template-parts/about-author' ); ?>
<nav id="nav-single" class="nav-single">
<div class="nav-single-inner">
<span class="nav-previous"><?php next_post_link( '%link', '<span class="meta-nav">' . _x( '«', 'Previous post link', 'wp-forge' ) . '</span> %title' ); ?></span>
<span class="nav-next"><?php previous_post_link( '%link', '%title <span class="meta-nav">' . _x( '»', 'Next post link', 'wp-forge' ) . '</span>' ); ?></span>
</div>
</nav><!-- .nav-single -->
<?php do_action( 'foundationpress_post_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_post_after_comments' ); ?>
</article>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</div>
<?php get_footer();