content-gallery.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * @package Illustratr
  4. */
  5. // Access global variable directly to adjust the content width for gallery post format
  6. if ( isset( $GLOBALS['content_width'] ) ) {
  7. $GLOBALS['content_width'] = 1100;
  8. }
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php
  13. if ( is_single() ) {
  14. the_title( '<h1 class="entry-title">', '</h1>' );
  15. } else {
  16. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  17. }
  18. ?>
  19. <?php
  20. /* translators: used between list items, there is a space after the comma */
  21. $categories_list = get_the_category_list( __( ', ', 'illustratr' ) );
  22. if ( 'post' == get_post_type() && $categories_list && illustratr_categorized_blog() ) :
  23. ?>
  24. <span class="cat-links"><?php echo $categories_list; ?></span>
  25. <?php endif; ?>
  26. </header><!-- .entry-header -->
  27. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  28. <div class="entry-summary">
  29. <?php the_excerpt(); ?>
  30. </div><!-- .entry-summary -->
  31. <?php else : ?>
  32. <div class="entry-content">
  33. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'illustratr' ) ); ?>
  34. <?php
  35. wp_link_pages(
  36. array(
  37. 'before' => '<div class="page-links clear">',
  38. 'after' => '</div>',
  39. 'pagelink' => '<span class="page-link">%</span>',
  40. )
  41. );
  42. ?>
  43. </div><!-- .entry-content -->
  44. <?php endif; ?>
  45. <footer class="entry-meta">
  46. <?php illustratr_posted_on(); ?>
  47. <span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'illustratr' ), get_post_format_string( 'gallery' ) ) ); ?>"><?php echo get_post_format_string( 'gallery' ); ?></a></span>
  48. <?php
  49. /* translators: used between list items, there is a space after the comma */
  50. the_tags( sprintf( '<span class="tags-links">%s ', esc_html__( 'Tagged', 'illustratr' ) ), esc_html__( ', ', 'illustratr' ), '</span>' );
  51. ?>
  52. <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
  53. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'illustratr' ), __( '1 Comment', 'illustratr' ), __( '% Comments', 'illustratr' ) ); ?></span>
  54. <?php endif; ?>
  55. <?php edit_post_link( __( 'Edit', 'illustratr' ), '<span class="edit-link">', '</span>' ); ?>
  56. </footer><!-- .entry-meta -->
  57. </article><!-- #post-## -->