Advertisement
Guest User

Untitled

a guest
Aug 24th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.31 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php get_template_part('template-part', 'head'); ?>
  4.  
  5. <?php get_template_part('template-part', 'topnav'); ?>
  6.  
  7. <!-- start content container -->
  8. <div class="row dmbs-content">
  9.  
  10.     <?php //left sidebar ?>
  11.     <?php get_sidebar( 'left' ); ?>
  12.  
  13.     <div class="col-md-<?php devdmbootstrap3_main_content_width(); ?> dmbs-main">
  14.  
  15.         <!-- any code included here occurs before the wordpress loop and is always displayed -->
  16.  
  17. <?php if (have_posts()) : ?>
  18.     <?php $count = 0; ?>
  19.  
  20.     <!-- If there are posts to display, set the count to zero and begin the loop
  21.      if there are posts to display, process any code included here only once
  22.      display any code output from this region above the entire set of posts -->
  23.  
  24.     <?php while (have_posts()) : the_post(); ?>
  25.         <?php $count++; ?>
  26.        
  27.             <div <?php post_class(); ?>>
  28.            
  29.         <!-- for each post, increase the count variable by one and process any code included here
  30.          the output of any code included here will be displayed above the content of every post -->
  31.          
  32.             <h2 class="page-header">
  33.                 <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'devdmbootstrap3' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
  34.             </h2>
  35.  
  36.         <?php if ($count == 1) : ?>
  37.  
  38.             <!-- if this is the first post, process any code that is specified in this region
  39.              process any code specified in this region before the content of the first post -->
  40.  
  41.             <?php the_content(); ?> <!-- display the full content of the first post only -->
  42.  
  43.             <!-- process any code specified in this region after the content of the first post -->
  44.  
  45.         <?php else : ?>
  46.            
  47.             <!-- if this is not the first post, process any code specified in this region
  48.             process any code specified in this region before the content of each post -->
  49.  
  50.             <?php the_excerpt(); ?> <!-- display only the excerpt for all other posts -->
  51.  
  52.             <!-- for all posts except the first, process this code below each post -->
  53.  
  54.         <?php endif; ?>
  55.             <!-- Post Meta info -->
  56.            
  57.            
  58.              <p class="text-right">
  59.         <span class="glyphicon glyphicon-user"></span> <?php the_author_posts_link(); ?>
  60.         <span class="glyphicon glyphicon-time"></span> <?php the_time('F jS, Y'); ?>
  61.         <span class="glyphicon glyphicon-edit"></span> <?php edit_post_link(__('Edit','devdmbootstrap3')); ?>
  62.     </p>
  63.             </div>
  64.         <!-- for each post, including the first, process any code included here
  65.          any code output will be displayed below the content of every post -->
  66.  
  67.     <?php endwhile; ?>
  68.  
  69.     <!-- stop the post loop and process any code included here only once
  70.      any code output will be displayed below the entire set of posts -->
  71.     <h4><?php posts_nav_link() ?><?php previous_post_link(); ?> &#8226;
  72.         <?php posts_nav_link() ?><?php next_post_link(); ?></h4>
  73.    
  74. <?php else : ?>
  75.  
  76.     <!-- if there are no posts to display, process any code that is included here
  77.      the output of any code included here will be displayed instead of posts -->
  78.     <p>Sorry, no posts matched your criteria.</p>
  79.  
  80. <?php endif; ?>
  81.  
  82. <!-- any code included here occurs after the wordpress loop and is always displayed -->
  83.    </div>
  84.  
  85.    <?php //get the right sidebar ?>
  86.    <?php get_sidebar( 'right' ); ?>
  87.  
  88. </div>
  89. <!-- end content container -->
  90.  
  91. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement