Advertisement
rdusnr

Untitled

Aug 1st, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 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 WordPress
  8. * @subpackage Kleo
  9. * @since Kleo 1.0
  10. */
  11. ?>
  12.  
  13. <?php
  14. /* Helper variables for this template */
  15. $is_single = is_single();
  16. $post_meta_enabled = kleo_postmeta_enabled();
  17. $post_media_enabled = ( kleo_postmedia_enabled() && kleo_get_post_thumbnail() != '' );
  18. /* Check if we need an extra container for meta and media */
  19. $show_extra_container = $is_single && sq_kleo()->get_option( 'has_vc_shortcode' ) && $post_media_enabled;
  20.  
  21. $post_class = 'clearfix';
  22. if ( $is_single && get_cfield( 'centered_text' ) == 1 ) {
  23. $post_class .= ' text-center';
  24. }
  25.  
  26. ?>
  27.  
  28. <!-- Begin Article -->
  29. <article id="post-<?php the_ID(); ?>" <?php post_class( array( $post_class ) ); ?>>
  30.  
  31. <?php if ( ! $is_single ) : ?>
  32. <h2 class="article-title entry-title">
  33. <a href="<?php the_permalink(); ?>"
  34. title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'kleo_framework' ), the_title_attribute( 'echo=0' ) ) ); ?>"
  35. rel="bookmark"><?php the_title(); ?></a>
  36. </h2>
  37. <?php endif; //! is_single() ?>
  38.  
  39. <?php if ( $show_extra_container ) : /* Small fix for full width layout to center media and meta */ ?>
  40. <div class="container">
  41. <?php endif; ?>
  42.  
  43. <?php if ( $post_meta_enabled ) : ?>
  44. <div class="article-meta">
  45. <span class="post-meta">
  46. <?php kleo_entry_meta(); ?>
  47. </span>
  48. <?php edit_post_link( esc_html__( 'Edit', 'kleo_framework' ), '<span class="edit-link">', '</span>' ); ?>
  49. </div><!--end article-meta-->
  50.  
  51. <?php endif; ?>
  52.  
  53. <?php if ( $post_media_enabled ) : ?>
  54. <div class="article-media">
  55. <?php echo kleo_get_post_thumbnail( null, 'kleo-full-width' ); ?>
  56. </div><!--end article-media-->
  57. <?php endif; ?>
  58.  
  59. <?php if ( $show_extra_container ) : /* Small fix for full width layout to center media and meta */ ?>
  60. </div>
  61. <?php endif; ?>
  62.  
  63. <div class="article-content">
  64.  
  65. <?php do_action( 'kleo_before_inner_article_loop' ); ?>
  66.  
  67. <?php if ( ! $is_single ) : // Only display Excerpts for Search ?>
  68.  
  69. <?php
  70. if (strpos('blog',$_SERVER['REQUEST_URI']) !== false) {
  71. the_content();
  72. } else {
  73. echo kleo_excerpt(50);
  74. }
  75. ?>
  76.  
  77.  
  78.  
  79. <p class="kleo-continue">
  80. <a class="btn btn-default"
  81. href="<?php the_permalink() ?>">
  82. <?php esc_html_e( sq_option( 'continue_reading_blog_text', 'Continue reading' ), 'kleo_framework' ); ?>
  83. </a>
  84. </p>
  85.  
  86. <?php else : ?>
  87.  
  88. <?php the_content( esc_html__( 'Continue reading <span class="meta-nav">&rarr;</span>', 'kleo_framework' ) ); ?>
  89. <?php wp_link_pages( array(
  90. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'kleo_framework' ),
  91. 'after' => '</div>',
  92. ) ); ?>
  93.  
  94. <?php endif; ?>
  95.  
  96. <?php do_action( 'kleo_after_inner_article_loop' ); ?>
  97.  
  98. </div><!--end article-content-->
  99.  
  100. </article><!--end article-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement