Advertisement
Guest User

content.php

a guest
Jul 6th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. <?php
  2. /**
  3. * The default template for displaying content. Used for both single and index/archive/search.
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Twelve
  7. * @since Twenty Twelve 1.0
  8. */
  9. ?>
  10.  
  11. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12. <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
  13. <div class="featured-post">
  14. <?php _e( 'Featured post', 'twentytwelve' ); ?>
  15. </div>
  16. <?php endif; ?>
  17. <header class="entry-header">
  18.  
  19. <?php if ( is_single() ) : ?>
  20. <h1 class="entry-title"><?php the_title(); ?></h1>
  21. <?php else : ?>
  22. <h1 class="entry-title">
  23. <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
  24. </h1>
  25. <?php endif; // is_single() ?>
  26. <?php if ( comments_open() ) : ?>
  27. <div class="comments-link">
  28. <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  29. </div><!-- .comments-link -->
  30. <?php endif; // comments_open() ?>
  31. </header><!-- .entry-header -->
  32.  
  33.  
  34. <?php if ( is_search() || is_home() ) : // Only display Excerpts for Search ?>
  35.  
  36. <div class="entry-summary">
  37.  
  38. <!-- Adds the 140x140 thumbnail/featured image -->
  39. <div class="excerpt-thumb">
  40. <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
  41. <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?>
  42. </a>
  43. </div>
  44. <?php the_excerpt(); ?>
  45. </div><!-- .entry-summary -->
  46. <?php else : ?>
  47. <div class="entry-content">
  48. <!-- Adds 140x140 featured image to single post view -->
  49. <div class="excerpt-thumb">
  50. <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?>
  51. </div>
  52. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
  53. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
  54. </div><!-- .entry-content -->
  55. <?php endif; ?>
  56.  
  57. <footer class="entry-meta">
  58. <?php twentytwelve_entry_meta(); ?>
  59. <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
  60. <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
  61. <div class="author-info">
  62. <div class="author-avatar">
  63. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
  64. </div><!-- .author-avatar -->
  65. <div class="author-description">
  66. <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
  67. <p><?php the_author_meta( 'description' ); ?></p>
  68. <div class="author-link">
  69. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  70. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
  71. </a>
  72. </div><!-- .author-link -->
  73. </div><!-- .author-description -->
  74. </div><!-- .author-info -->
  75. <?php endif; ?>
  76. </footer><!-- .entry-meta -->
  77. </article><!-- #post -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement