Advertisement
Zeaks

post nav above comments

Apr 26th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.55 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying all single posts and attachments
  4.  *
  5.  * @package WordPress
  6.  * @subpackage Twenty_Fifteen
  7.  * @since Twenty Fifteen 1.0
  8.  */
  9.  
  10. get_header(); ?>
  11.  
  12.     <div id="primary" class="content-area">
  13.         <main id="main" class="site-main" role="main">
  14.  
  15.         <?php
  16.         // Start the loop.
  17.         while ( have_posts() ) : the_post();
  18.  
  19.             /*
  20.              * Include the post format-specific template for the content. If you want to
  21.              * use this in a child theme, then include a file called called content-___.php
  22.              * (where ___ is the post format) and that will be used instead.
  23.              */
  24.             get_template_part( 'content', get_post_format() );
  25.  
  26.  
  27.  
  28.             // Previous/next post navigation.
  29.             the_post_navigation( array(
  30.                 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
  31.                     '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
  32.                     '<span class="post-title">%title</span>',
  33.                 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
  34.                     '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
  35.                     '<span class="post-title">%title</span>',
  36.             ) );
  37.  
  38.         // End the loop.
  39.         endwhile;
  40.        
  41.             // If comments are open or we have at least one comment, load up the comment template.
  42.             if ( comments_open() || get_comments_number() ) :
  43.                 comments_template();
  44.             endif;     
  45.        
  46.         ?>
  47.  
  48.         </main><!-- .site-main -->
  49.     </div><!-- .content-area -->
  50.  
  51. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement