Advertisement
scanthe17

content.php

Jul 29th, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template part for displaying posts
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Catch_Wheels
  8. */
  9.  
  10. ?>
  11.  
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <div class="hentry-inner">
  14. <?php catch_wheels_archive_image(); ?>
  15.  
  16. <div class="entry-container">
  17. <?php if ( is_sticky() ) { ?>
  18. <span class="sticky-label"><?php esc_html_e( 'Featured', 'catch-wheels-pro' ); ?></span>
  19. <?php } ?>
  20.  
  21. <header class="entry-header">
  22. <?php
  23. $show_content = catch_wheels_get_content_layout();
  24. $show_meta = get_theme_mod( 'catch_wheels_archive_meta_show', 'show-meta' );
  25.  
  26. if ( 'show-meta' === $show_meta ) : ?>
  27. <div class="entry-category">
  28. <?php catch_wheels_entry_category(); ?>
  29. </div><!-- .entry_category -->
  30. <?php endif;
  31.  
  32. if ( is_singular() ) :
  33. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  34. else :
  35. the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>');
  36.  
  37. if ( 'show-meta' === $show_meta ) : ?>
  38. <div class="entry-meta">
  39. <?php echo get_the_date(); ?>
  40. <?php catch_wheels_posted_by(); ?>
  41. </div><!-- .entry-meta -->
  42. <?php endif;
  43. endif; ?>
  44. </header><!-- .entry-header -->
  45.  
  46.  
  47. <?php
  48. if ( 'full-content' === $show_content || 'full-content-image-top' === $show_content ) {
  49. $content = apply_filters( 'the_content', get_the_content() );
  50. $content = str_replace( ']]>', ']]&gt;', $content );
  51. echo '<div class="entry-content">' . $content . '</div><!-- .entry-content -->';
  52. } else {
  53. echo '<div class="entry-summary"><p>' . get_the_excerpt() . '</p></div><!-- .entry-summary -->';
  54. } ?>
  55.  
  56. </div> <!-- .entry-container -->
  57. </div> <!-- .hentry-inner -->
  58. </article><!-- #post-<?php //the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement