PageRenderTime 35ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/content.php

https://github.com/tomtom10/required-foundation
PHP | 47 lines | 39 code | 2 blank | 6 comment | 11 complexity | 9b6333757217653393310802d865f58e MD5 | raw file
  1. <?php
  2. /**
  3. * The default template for displaying content single/search/archive
  4. *
  5. * @package required+ Foundation
  6. * @since required+ Foundation 0.3.0
  7. */
  8. ?>
  9. <!-- START: content.php -->
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <?php if ( is_single() ) : ?>
  13. <h1 class="entry-title"><?php the_title(); ?></h1>
  14. <?php else : ?>
  15. <?php the_post_thumbnail(); ?>
  16. <h1 class="entry-title">
  17. <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'requiredfoundation' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
  18. </h1>
  19. <?php endif; // is_single() ?>
  20. </header><!-- .entry-header -->
  21. <?php if ( 'post' == get_post_type() ) : ?>
  22. <div class="entry-meta">
  23. <?php required_posted_on(); ?>
  24. <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
  25. <span class="label radius secondary"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'requiredfoundation' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php _ex( 'Featured', 'Post format title', 'requiredfoundation' ); ?></a></span>
  26. <?php endif; ?>
  27. </div><!-- .entry-meta -->
  28. <?php endif; ?>
  29. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  30. <div class="entry-summary">
  31. <?php the_excerpt(); ?>
  32. </div><!-- .entry-summary -->
  33. <?php else : ?>
  34. <div class="entry-content">
  35. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'requiredfoundation' ) ); ?>
  36. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'requiredfoundation' ) . '</span>', 'after' => '</div>' ) ); ?>
  37. </div><!-- .entry-content -->
  38. <?php endif; ?>
  39. <footer class="entry-meta">
  40. <?php if ( 'post' == get_post_type() ) : ?>
  41. <?php get_template_part('entry-meta', get_post_format() ); ?>
  42. <?php endif; ?>
  43. </footer><!-- #entry-meta -->
  44. </article><!-- #post-<?php the_ID(); ?> -->
  45. <!-- END: content.php -->