template-fullwidth.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /*
  3. Template Name: Full width template
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <div class="wrapper section-inner">
  8. <div class="content full-width">
  9. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  10. <div class="posts">
  11. <div class="post">
  12. <?php if ( has_post_thumbnail() ) : ?>
  13. <div class="featured-media">
  14. <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
  15. <?php the_post_thumbnail('post-image'); ?>
  16. <?php if ( !empty(get_post(get_post_thumbnail_id())->post_excerpt) ) : ?>
  17. <div class="media-caption-container">
  18. <p class="media-caption"><?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?></p>
  19. </div>
  20. <?php endif; ?>
  21. </a>
  22. </div> <!-- /featured-media -->
  23. <?php endif; ?>
  24. <div class="post-header">
  25. <h2 class="post-title"><?php the_title(); ?></h2>
  26. </div> <!-- /post-header -->
  27. <div class="post-content">
  28. <?php the_content(); ?>
  29. <?php if ( current_user_can( 'manage_options' ) ) : ?>
  30. <p><?php edit_post_link( __('Edit', 'hemingway') ); ?></p>
  31. <?php endif; ?>
  32. <div class="clear"></div>
  33. </div> <!-- /post-content -->
  34. </div> <!-- /post -->
  35. <?php if ( comments_open() ) : ?>
  36. <?php comments_template( '', true ); ?>
  37. <?php endif; ?>
  38. </div> <!-- /posts -->
  39. <?php endwhile; else: ?>
  40. <p><?php _e("We couldn't find any posts that matched your query. Please try again.", "hemingway"); ?></p>
  41. <?php endif; ?>
  42. </div> <!-- /content -->
  43. </div> <!-- /wrapper section-inner -->
  44. <?php get_footer(); ?>