Advertisement
samikeijonen

Custom index.php origin theme: first post content

Apr 25th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.35 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Index Template
  4.  *
  5.  * This is the default template.  It is used when a more specific template can't be found to display
  6.  * posts.  It is unlikely that this template will ever be used, but there may be rare cases.
  7.  *
  8.  * @package Origin
  9.  * @subpackage Template
  10.  */
  11.  
  12. get_header(); // Loads the header.php template. ?>
  13.  
  14.     <?php do_atomic( 'before_content' ); // origin_before_content ?>
  15.  
  16.     <div id="content">
  17.  
  18.         <?php do_atomic( 'open_content' ); // origin_open_content ?>
  19.  
  20.         <div class="hfeed">
  21.  
  22.             <?php if ( have_posts() ) : ?>
  23.            
  24.             <?php $i = 1; ?>
  25.  
  26.                 <?php while ( have_posts() ) : the_post(); ?>
  27.  
  28.                     <?php do_atomic( 'before_entry' ); // origin_before_entry ?>
  29.  
  30.                         <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
  31.  
  32.                             <?php do_atomic( 'open_entry' ); // origin_open_entry ?>
  33.  
  34.                             <div class="sticky-header">
  35.                                    
  36.                                 <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
  37.  
  38.                                 <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( '[entry-published] &middot; by [entry-author] &middot; in [entry-terms taxonomy="category" before=""] [entry-edit-link before=" &middot; "]', 'origin' ) . '</div>' ); ?>
  39.                                        
  40.                             </div><!-- .sticky-header -->
  41.  
  42.                             <?php if ( $i == 1 ) { ?>
  43.  
  44.                                 <div class="entry-content">
  45.  
  46.                                     <?php the_content(); ?>
  47.  
  48.                                     <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'origin' ), 'after' => '</p>' ) ); ?>
  49.  
  50.                                 </div><!-- .entry-content -->
  51.  
  52.                             <?php } else { ?>
  53.  
  54.                                 <div class="entry-summary">
  55.                                     <?php the_excerpt(); ?>
  56.                                 </div>
  57.  
  58.                             <?php } ?>
  59.                            
  60.                             <?php do_atomic( 'close_entry' ); // origin_close_entry ?>
  61.  
  62.                         </div><!-- .hentry -->
  63.  
  64.                     <?php do_atomic( 'after_entry' ); // origin_after_entry ?>
  65.                    
  66.                     <?php $i++; ?>
  67.  
  68.                 <?php endwhile; ?>
  69.  
  70.             <?php else : ?>
  71.  
  72.                 <?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
  73.  
  74.             <?php endif; ?>
  75.  
  76.         </div><!-- .hfeed -->
  77.  
  78.         <?php do_atomic( 'close_content' ); // origin_close_content ?>
  79.  
  80.         <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
  81.  
  82.     </div><!-- #content -->
  83.  
  84.     <?php do_atomic( 'after_content' ); // origin_after_content ?>
  85.  
  86. <?php get_footer(); // Loads the footer.php template. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement