content-gallery.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. <?php if ( get_post_gallery() && ! post_password_required() ) : ?>
  12. <div class="entry-gallery">
  13. <?php echo get_post_gallery(); ?>
  14. </div><!-- .entry-gallery -->
  15. <?php endif; ?>
  16. <header class="entry-header">
  17. <?php
  18. if ( is_single() ) {
  19. the_title( '<h1 class="entry-title">', '</h1>' );
  20. } else {
  21. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  22. }
  23. ?>
  24. <?php
  25. /* translators: used between list items, there is a space after the comma */
  26. $categories_list = get_the_category_list( __( ', ', 'illustratr' ) );
  27. if ( 'post' == get_post_type() && $categories_list && illustratr_categorized_blog() ) :
  28. ?>
  29. <span class="cat-links"><?php echo $categories_list; ?></span>
  30. <?php endif; ?>
  31. </header><!-- .entry-header -->
  32. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  33. <div class="entry-summary">
  34. <?php the_excerpt(); ?>
  35. </div><!-- .entry-summary -->
  36. <?php else : ?>
  37. <div class="entry-content">
  38. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'illustratr' ) ); ?>
  39. <?php
  40. wp_link_pages( array(
  41. 'before' => '<div class="page-links clear">',
  42. 'after' => '</div>',
  43. 'pagelink' => '<span class="page-link">%</span>',
  44. ) );
  45. ?>
  46. </div><!-- .entry-content -->
  47. <?php endif; ?>
  48. <footer class="entry-meta">
  49. <?php illustratr_posted_on(); ?>
  50. <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>
  51. <?php
  52. /* translators: used between list items, there is a space after the comma */
  53. the_tags( sprintf( '<span class="tags-links">%s ', esc_html__( 'Tagged', 'illustratr' ) ), esc_html__( ', ', 'illustratr' ), '</span>' ); ?>
  54. <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
  55. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'illustratr' ), __( '1 Comment', 'illustratr' ), __( '% Comments', 'illustratr' ) ); ?></span>
  56. <?php endif; ?>
  57. <?php edit_post_link( __( 'Edit', 'illustratr' ), '<span class="edit-link">', '</span>' ); ?>
  58. </footer><!-- .entry-meta -->
  59. </article><!-- #post-## -->