Advertisement
sarahn

content-t.php

Dec 24th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. <?php
  2. /**
  3. * The modified default template for displaying content
  4. *
  5. * To be used with the modified category.php: http://pastebin.com/ZW1c9fGB
  6. *
  7. * Used for both single and index/archive/search.
  8. *
  9. * @package WordPress
  10. * @subpackage Twenty_Twelve
  11. * @since Twenty Twelve 1.0
  12. */
  13.  
  14. ?>
  15.  
  16. <article id="post-<?php echo $t_post_id; ?>" <?php //post_class(); ?>>
  17. <?php if ( is_sticky($t_post_id) && is_home() && ! is_paged() ) : ?>
  18. <div class="featured-post">
  19. <?php _e( 'Featured post', 'twentytwelve' ); ?>
  20. </div>
  21. <?php endif; ?>
  22. <header class="entry-header">
  23. <?php echo get_the_post_thumbnail( $t_post_id ); //the_post_thumbnail();?>
  24. <?php if ( is_single($t_post_id) ) : ?>
  25. <h1 class="entry-title"><?php echo get_the_title($t_post_id); //the_title(); ?></h1>
  26. <?php else : ?>
  27. <h1 class="entry-title">
  28. <a href="<?php echo get_permalink($t_post_id); //the_permalink(); ?>" rel="bookmark"><?php echo get_the_title($t_post_id); //the_title(); ?></a>
  29. </h1>
  30. <?php endif; // is_single() ?>
  31. <?php if ( comments_open() ) : ?>
  32. <div class="comments-link">
  33. <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  34. </div><!-- .comments-link -->
  35. <?php endif; // comments_open() ?>
  36. </header><!-- .entry-header -->
  37.  
  38. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  39. <div class="entry-summary">
  40. <?php echo $t_post->post_excerpt; //the_excerpt(); ?>
  41. </div><!-- .entry-summary -->
  42. <?php else : ?>
  43. <div class="entry-content">
  44. <?php echo $t_post->post_content;//the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
  45. <?php //wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
  46. </div><!-- .entry-content -->
  47. <?php endif; ?>
  48.  
  49. <footer class="entry-meta">
  50. <?php twentytwelve_entry_meta(); ?>
  51. <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
  52. <?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. ?>
  53. <div class="author-info">
  54. <div class="author-avatar">
  55. <?php
  56. /** This filter is documented in author.php */
  57. $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 );
  58. echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
  59. ?>
  60. </div><!-- .author-avatar -->
  61. <div class="author-description">
  62. <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
  63. <p><?php the_author_meta( 'description' ); ?></p>
  64. <div class="author-link">
  65. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  66. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
  67. </a>
  68. </div><!-- .author-link -->
  69. </div><!-- .author-description -->
  70. </div><!-- .author-info -->
  71. <?php endif; ?>
  72. </footer><!-- .entry-meta -->
  73. </article><!-- #post -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement