Don't like ads? PRO users don't see any ads ;-)
Guest

Origin custom loop. One content, rest excerpt.

By: samikeijonen on Apr 25th, 2012  |  syntax: PHP  |  size: 0.56 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php $i = 1; ?>
  2. .
  3. .
  4. .
  5.  
  6. <?php if ( $i == 1 ) { ?>
  7.                                                        
  8.                                                         <div class="entry-content">
  9.                                                                
  10.                                                                 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'origin' ) ); ?>
  11.                                                                
  12.                                                                 <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'origin' ), 'after' => '</p>' ) ); ?>
  13.                                                                
  14.                                                         </div><!-- .entry-content -->
  15.                                                        
  16.                                                         <?php } else { ?>
  17.                                                                
  18.                                                                 <div class="entry-summary">
  19.                                                                         <?php the_excerpt(); ?>
  20.                                                                 </div>
  21.                                                                
  22.                                                         <?php } ?>
  23. <?php $i++; ?>