SHARE
TWEET

post.php

a guest Aug 26th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * The default template for displaying content
  4.  *
  5.  * @package Catch Themes
  6.  * @subpackage Catch Kathmandu
  7.  * @since Catch Kathmandu 1.0
  8.  */
  9.  
  10. //Getting data from Theme Options Panel and Meta Box
  11. global $catchkathmandu_options_settings;
  12. $options = $catchkathmandu_options_settings;
  13.  
  14. //Content Layout
  15. $current_content_layout = $options['content_layout'];
  16.  
  17. //More Tag
  18. $moretag = $options[ 'more_tag_text' ];
  19. ?>
  20.  
  21. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  22.  
  23.     <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
  24.         <div class="featured-sticky"><?php _e( 'Featured post', 'catchkathmandu' ); ?></div>
  25.     <?php endif; ?>
  26.  
  27.     <header class="entry-header">
  28.         <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'catchkathmandu' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  29.     </header>
  30.    
  31.     <?php if ( function_exists( 'catchkathmandu_content_image' ) ) : catchkathmandu_content_image(); endif; ?>
  32.    
  33.     <div class="entry-container">
  34.             <?php if ( 'post' == get_post_type() ) : ?>
  35.                 <div class="entry-meta">
  36.                     <?php catchkathmandu_header_meta(); ?>
  37.                 </div><!-- .entry-meta -->
  38.             <?php endif; ?>
  39.         </header><!-- .entry-header -->
  40.  
  41.         <?php
  42.         //Get Excerpt
  43.         $catchkathmandu_excerpt = get_the_excerpt();
  44.        
  45.         if ( is_search() || ( !is_single() && $current_content_layout=='excerpt' && !empty( $catchkathmandu_excerpt ) ) ) : ?>
  46.             <div class="entry-summary">
  47.                 <?php the_excerpt(); ?>
  48.             </div><!-- .entry-summary -->    
  49.         <?php else : ?>
  50.             <div class="entry-content">
  51.                 <?php the_content( $moretag ); ?>
  52.                 <?php wp_link_pages( array(
  53.                     'before'        => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catchkathmandu' ) . '</span>',
  54.                     'after'         => '</div>',
  55.                     'link_before'   => '<span>',
  56.                     'link_after'    => '</span>',
  57.                 ) );
  58.                 ?>
  59.             </div><!-- .entry-content -->
  60.         <?php endif; ?>
  61.  
  62.         <footer class="entry-meta">
  63.             <?php catchkathmandu_footer_meta(); ?>
  64.             <?php if ( comments_open() && ! post_password_required() ) : ?>
  65.                 <span class="sep"> | </span>
  66.                 <span class="comments-link">
  67.                     <?php comments_popup_link(__('Leave a reply', 'catchkathmandu'), __('1 Reply', 'catchkathmandu'), __('% Replies', 'catchkathmandu')); ?>
  68.                 </span>
  69.             <?php endif; ?>            
  70.             <?php edit_post_link( __( 'Edit', 'catchkathmandu' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
  71.             <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
  72.                 <div class="author-info">
  73.                     <div class="author-avatar">
  74.                         <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'catchkathmandu_author_bio_avatar_size', 68 ) ); ?>
  75.                     </div><!-- .author-avatar -->
  76.                     <div class="author-description">
  77.                         <h2><?php printf( __( 'About %s', 'catchkathmandu' ), get_the_author() ); ?></h2>
  78.                         <p><?php the_author_meta( 'description' ); ?></p>
  79.                         <div class="author-link">
  80.                             <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  81.                                 <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'catchkathmandu' ), get_the_author() ); ?>
  82.                             </a>
  83.                         </div><!-- .author-link -->
  84.                     </div><!-- .author-description -->
  85.                 </div><!-- .author-info -->
  86.             <?php endif; ?>            
  87.         </footer><!-- .entry-meta -->
  88.        
  89.     </div><!-- .entry-container -->
  90.    
  91. </article><!-- #post-<?php the_ID(); ?> -->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top