Advertisement
Guest User

_S content.php excerpt

a guest
Dec 30th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1.     <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  2.     <div class="entry-summary">
  3.         <?php the_excerpt(); ?>
  4.     </div><!-- .entry-summary -->
  5.     <?php else : ?>
  6.     <div class="entry-content">
  7.             <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'safe_investment_home_inspections' ) ); ?>
  8.             <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'safe_investment_home_inspections' ), 'after' => '</div>' ) ); ?>
  9.     </div><!-- .entry-content -->
  10.     <?php endif; ?>
  11.  
  12.  
  13.  
  14. <!-- My attempt -->
  15.  
  16.     <div class="entry-summary">
  17.         <?php the_excerpt(); ?>
  18.     </div><!-- .entry-summary -->
  19.     <?php else : ?>
  20.     <div class="entry-content">
  21.         <?php if ( is_page() ) : ?>
  22.             <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'safe_investment_home_inspections' ) ); ?>
  23.             <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'safe_investment_home_inspections' ), 'after' => '</div>' ) ); ?>
  24.                 <div class="content-sidebar">
  25.                     <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar2') ) : ?>
  26.                     <?php endif; ?>
  27.                 </div>
  28.         <?php else : ?>
  29.             <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'safe_investment_home_inspections' ) ); ?>
  30.             <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'safe_investment_home_inspections' ), 'after' => '</div>' ) ); ?>
  31.     </div><!-- .entry-content -->
  32.     <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement