Advertisement
Guest User

Single Post Loop

a guest
Mar 18th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. <?php
  2.     /*-----------------------------------------------------------------------------------*/
  3.     /* Start Single loop
  4.     /*-----------------------------------------------------------------------------------*/
  5.    
  6.     if( is_single() ) {
  7. ?>
  8.  
  9.  
  10.             <?php if ( have_posts() ) : ?>
  11.  
  12.                 <?php while ( have_posts() ) : the_post(); ?>
  13.  
  14.                     <article class="post">
  15.                    
  16.                         <h1 class="title"><?php the_title() ?></h1>
  17.                         <div class="meta clearfix">
  18.                             <div class="category"><?php echo get_the_category_list(); ?></div>
  19.                             <div class="tags"><?php echo get_the_tag_list( '| &nbsp;', '&nbsp;' ); ?></div>
  20.                         </div><!--/post-meta -->
  21.                         <div class="the-content">
  22.                             <?php the_content( 'Continue...' ); ?>
  23.                            
  24.                             <?php wp_link_pages(); ?>
  25.                         </div><!-- the-content -->                 
  26.                        
  27.                     </article>
  28.  
  29.                 <?php endwhile; ?>
  30.  
  31.                 <!-- pagintation -->
  32.                 <div id="pagination" class="clearfix">
  33.                     <div class="past-page"><?php previous_posts_link( 'Newer &raquo;' ); ?></div>
  34.                     <div class="next-page"><?php next_posts_link( ' &laquo; Older' ); ?></div>
  35.                 </div><!-- pagination -->
  36.  
  37.             <?php else : ?>
  38.                
  39.                 <article class="post error">
  40.                     <h1 class="404">Nothing posted yet</h1>
  41.                 </article>
  42.  
  43.             <?php endif; ?>
  44.  
  45.  
  46.     <?php } //end is_single(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement