Advertisement
pratikshrestha

content.php

Feb 22nd, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.21 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The default template for displaying content
  4.  *
  5.  * Used for both single and index/archive/search
  6.  *
  7.  * @package Catch Themes
  8.  * @subpackage Clean Box
  9.  * @since Clean Box 0.1
  10.  */
  11. ?>
  12.  
  13. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  14.     <div class="archive-post-wrap">
  15.         <?php
  16.         /**
  17.          * clean_box_before_entry_container hook
  18.          *
  19.          * @hooked clean_box_archive_content_image - 10
  20.          */
  21.         do_action( 'clean_box_before_entry_container' );
  22.         // Get the Excerpt
  23.         $cleanbox_excerpt = get_the_excerpt(); ?>
  24.  
  25.         <div class="entry-container">
  26.             <header class="entry-header">
  27.                 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  28.  
  29.                 <?php if ( 'post' == get_post_type() ) : ?>
  30.  
  31.                     <?php clean_box_entry_meta(); ?>
  32.  
  33.                 <?php endif; ?>
  34.             </header><!-- .entry-header -->
  35.  
  36.             <?php
  37.             $options = clean_box_get_theme_options();
  38.  
  39.             if ( is_search() ) : ?>
  40.                 <div class="entry-content">
  41.                     <?php the_content(); ?>
  42.                     <?php
  43.                         wp_link_pages( array(
  44.                             'before' => '<div class="page-links"><span class="pages">' . __( 'Pages:', 'clean-box' ) . '</span>',
  45.                             'after'  => '</div>',
  46.                             'link_before'   => '<span>',
  47.                             'link_after'    => '</span>',
  48.                         ) );
  49.                     ?>
  50.                 </div><!-- .entry-content -->
  51.             <?php
  52.             elseif ( 'full-content' != $options['content_layout'] && !empty( $cleanbox_excerpt ) ) : // Only display Excerpts for Search and if 'full-content' is not selected ?>
  53.                 <div class="entry-summary">
  54.                     <?php the_excerpt(); ?>
  55.                 </div><!-- .entry-summary -->
  56.             <?php else : ?>
  57.                 <div class="entry-content">
  58.                     <?php the_content(); ?>
  59.                     <?php
  60.                         wp_link_pages( array(
  61.                             'before' => '<div class="page-links"><span class="pages">' . __( 'Pages:', 'clean-box' ) . '</span>',
  62.                             'after'  => '</div>',
  63.                             'link_before'   => '<span>',
  64.                             'link_after'    => '</span>',
  65.                         ) );
  66.                     ?>
  67.                 </div><!-- .entry-content -->
  68.             <?php endif; ?>
  69.  
  70.             <footer class="entry-footer">
  71.                 <?php clean_box_tag_category(); ?>
  72.             </footer><!-- .entry-footer -->
  73.         </div><!-- .entry-container -->
  74.     </div><!-- .archive-post-wrap -->
  75. </article><!-- #post -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement