Advertisement
hortensiagg

$wp_query->current_post> 0

Sep 17th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Eleven
  7. * @since Twenty Eleven 1.0
  8. */
  9. ?>
  10.  
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12.  
  13. <header class="entry-header">
  14. <?php if ( is_sticky() ) : ?>
  15. <hgroup>
  16. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  17. <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
  18. </hgroup>
  19. <?php else : ?>
  20. <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  21. <?php endif; ?>
  22.  
  23. <?php if ( 'post' == get_post_type() ) : ?>
  24. <div class="entry-meta">
  25. <?php twentyeleven_posted_on(); ?>
  26. </div><!-- .entry-meta -->
  27. <?php endif; ?>
  28.  
  29. <?php if ( comments_open() && ! post_password_required() ) : ?>
  30. <div class="comments-link">
  31. <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
  32. </div>
  33. <?php endif; ?>
  34. </header><!-- .entry-header -->
  35.  
  36. <?php if (is_search () || is_paged() || $wp_query->current_post> 0 ) : // Only display excerpts for Posts and Search ?>
  37. <div class="entry-summary"></div>
  38. <!-- This adds the post thumbnail/featured image, title and excerpt-->
  39. <div class="excerpt-thumbpost">
  40.  
  41. <h7 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute() ); ?>" rel="bookmark"><?php the_title(); ?></a></h7>
  42. <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft' ) ?> </div>
  43.  
  44. <?php the_excerpt(); ?>
  45.  
  46. <?php else : ?>
  47. <div class="entry-content">
  48.  
  49. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
  50. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
  51. </div><!-- .entry-content -->
  52.  
  53.  
  54. <span class='st_pinterest' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span><span class='st_linkedin' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span><span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span><span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span><span class='st_email' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span><span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span>
  55.  
  56. <?php endif; ?>
  57.  
  58. <footer class="entry-meta">
  59. <?php $show_sep = false; ?>
  60. <?php if ('post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  61. <?php
  62. /* translators: used between list items, there is a space after the comma */
  63. $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  64. if ( $categories_list ):
  65. ?>
  66. <span class="cat-links">
  67. <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  68. $show_sep = true; ?>
  69. </span>
  70. <?php endif; // End if categories ?>
  71. <?php
  72. /* translators: used between list items, there is a space after the comma */
  73. $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  74. if ( $tags_list ):
  75. if ( $show_sep ) : ?>
  76. <span class="sep"> | </span>
  77. <?php endif; // End if $show_sep ?>
  78. <span class="tag-links">
  79. <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  80. $show_sep = true; ?>
  81. </span>
  82. <?php endif; // End if $tags_list ?>
  83. <?php endif; // End if 'post' == get_post_type() ?>
  84.  
  85. <?php if ( comments_open() ) : ?>
  86. <?php if ( $show_sep ) : ?>
  87. <span class="sep"> | </span>
  88. <?php endif; // End if $show_sep ?>
  89. <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
  90. <?php endif; // End if comments_open() ?>
  91.  
  92. <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  93. </footer><!-- #entry-meta -->
  94. </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement