content.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /**
  3. * @package Illustratr
  4. */
  5. $format = get_post_format();
  6. ?>
  7. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  8. <?php if ( '' != get_the_post_thumbnail() && '' == $format ) : ?>
  9. <div class="entry-thumbnail">
  10. <?php if ( ! is_single() ) : ?>
  11. <a href="<?php the_permalink(); ?>">
  12. <?php the_post_thumbnail( 'illustratr-featured-image' ); ?>
  13. </a>
  14. <?php else : ?>
  15. <?php the_post_thumbnail( 'illustratr-featured-image' ); ?>
  16. <?php endif; ?>
  17. </div><!-- .entry-thumbnail -->
  18. <?php endif; ?>
  19. <header class="entry-header">
  20. <?php
  21. if ( is_single() ) {
  22. the_title( '<h1 class="entry-title">', '</h1>' );
  23. } else {
  24. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  25. }
  26. ?>
  27. <?php
  28. /* translators: used between list items, there is a space after the comma */
  29. $categories_list = get_the_category_list( __( ', ', 'illustratr' ) );
  30. if ( 'post' == get_post_type() && $categories_list && illustratr_categorized_blog() ) :
  31. ?>
  32. <span class="cat-links"><?php echo $categories_list; ?></span>
  33. <?php endif; ?>
  34. <?php
  35. if ( 'jetpack-portfolio' == get_post_type() ) {
  36. echo get_the_term_list( $post->ID, 'jetpack-portfolio-type', '<span class="portfolio-entry-meta">', _x(', ', 'Used between list items, there is a space after the comma.', 'illustratr' ), '</span>' );
  37. }
  38. ?>
  39. </header><!-- .entry-header -->
  40. <?php if ( 'jetpack-portfolio' != get_post_type() ) : // Don't display Content for Portfolio ?>
  41. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  42. <div class="entry-summary">
  43. <?php the_excerpt(); ?>
  44. </div><!-- .entry-summary -->
  45. <?php else : ?>
  46. <div class="entry-content">
  47. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'illustratr' ) ); ?>
  48. <?php
  49. wp_link_pages( array(
  50. 'before' => '<div class="page-links clear">',
  51. 'after' => '</div>',
  52. 'pagelink' => '<span class="page-link">%</span>',
  53. ) );
  54. ?>
  55. </div><!-- .entry-content -->
  56. <?php endif; ?>
  57. <?php endif; ?>
  58. <?php
  59. $comments_status = false;
  60. if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) {
  61. $comments_status = true;
  62. }
  63. ?>
  64. <?php if ( 'jetpack-portfolio' != get_post_type() ) : // Don't display entry-meta for Portfolio ?>
  65. <footer class="entry-meta">
  66. <?php if ( 'post' == get_post_type() ) : // Hide post meta for pages on Search ?>
  67. <?php illustratr_posted_on(); ?>
  68. <?php if( has_post_format() ) : ?>
  69. <span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( $format ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'illustratr' ), get_post_format_string( $format ) ) ); ?>"><?php echo get_post_format_string( $format ); ?></a></span>
  70. <?php endif; ?>
  71. <?php
  72. /* translators: used between list items, there is a space after the comma */
  73. the_tags( sprintf( '<span class="tags-links">%s ', esc_html__( 'Tagged', 'illustratr' ) ), esc_html__( ', ', 'illustratr' ), '</span>' ); ?>
  74. <?php endif; // End if 'post' == get_post_type() ?>
  75. <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
  76. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'illustratr' ), __( '1 Comment', 'illustratr' ), __( '% Comments', 'illustratr' ) ); ?></span>
  77. <?php endif; ?>
  78. <?php edit_post_link( __( 'Edit', 'illustratr' ), '<span class="edit-link">', '</span>' ); ?>
  79. </footer><!-- .entry-meta -->
  80. <?php endif; ?>
  81. </article><!-- #post-## -->