Advertisement
Guest User

post.php

a guest
Aug 26th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  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. <?php if ( function_exists( 'catchkathmandu_content_image' ) ) : catchkathmandu_content_image(); endif; ?>
  28.  
  29. <div class="entry-container">
  30.  
  31. <header class="entry-header">
  32. <?php if ( 'post' == get_post_type() ) : ?>
  33. <div class="entry-meta">
  34. <?php catchkathmandu_header_meta(); ?>
  35. </div><!-- .entry-meta -->
  36. <?php endif; ?>
  37. </header><!-- .entry-header -->
  38.  
  39. <?php
  40. //Get Excerpt
  41. $catchkathmandu_excerpt = get_the_excerpt();
  42.  
  43. if ( is_search() || ( !is_single() && $current_content_layout=='excerpt' && !empty( $catchkathmandu_excerpt ) ) ) : ?>
  44. <div class="entry-summary">
  45. <?php the_excerpt(); ?>
  46. </div><!-- .entry-summary -->
  47. <?php else : ?>
  48. <div class="entry-content">
  49. <?php the_content( $moretag ); ?>
  50. <?php wp_link_pages( array(
  51. 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catchkathmandu' ) . '</span>',
  52. 'after' => '</div>',
  53. 'link_before' => '<span>',
  54. 'link_after' => '</span>',
  55. ) );
  56. ?>
  57. </div><!-- .entry-content -->
  58. <?php endif; ?>
  59.  
  60. <footer class="entry-meta">
  61. <?php catchkathmandu_footer_meta(); ?>
  62. <?php if ( comments_open() && ! post_password_required() ) : ?>
  63. <span class="sep"> | </span>
  64. <span class="comments-link">
  65. <?php comments_popup_link(__('Leave a reply', 'catchkathmandu'), __('1 Reply', 'catchkathmandu'), __('% Replies', 'catchkathmandu')); ?>
  66. </span>
  67. <?php endif; ?>
  68. <?php edit_post_link( __( 'Edit', 'catchkathmandu' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
  69. <?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. ?>
  70. <div class="author-info">
  71. <div class="author-avatar">
  72. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'catchkathmandu_author_bio_avatar_size', 68 ) ); ?>
  73. </div><!-- .author-avatar -->
  74. <div class="author-description">
  75. <h2><?php printf( __( 'About %s', 'catchkathmandu' ), get_the_author() ); ?></h2>
  76. <p><?php the_author_meta( 'description' ); ?></p>
  77. <div class="author-link">
  78. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  79. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'catchkathmandu' ), get_the_author() ); ?>
  80. </a>
  81. </div><!-- .author-link -->
  82. </div><!-- .author-description -->
  83. </div><!-- .author-info -->
  84. <?php endif; ?>
  85. </footer><!-- .entry-meta -->
  86.  
  87. </div><!-- .entry-container -->
  88.  
  89. </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement