Advertisement
Guest User

travel-insight-pro-code

a guest
Feb 1st, 2019
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.48 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 Theme Palace
  8.  * @subpackage Travel Insight Pro
  9.  * @since Travel Insight Pro 1.0
  10.  */
  11. $options = travel_insight_pro_get_theme_options();
  12. $sidebar_enable = travel_insight_pro_is_sidebar_enable();
  13. $img_size = ( false == $sidebar_enable ) ? 'travel-insight-pro-blog' : 'large';
  14. $img_enable_class = ( false == $options['blog_img_enable'] ) ? 'no-img-article' : '';
  15. ?>
  16.  
  17. <article id="post-<?php the_ID(); ?>" <?php post_class( 'column-wrapper ' . $img_enable_class ); ?>>
  18.  
  19.     <?php if ( 'post' === get_post_type() ) : ?>
  20.         <div class="entry-meta">
  21.             <?php travel_insight_pro_posted_on(); ?>
  22.         </div><!-- .entry-meta -->
  23.     <?php endif;
  24.  
  25.     if ( true === $options['blog_img_enable'] ) :
  26.         if ( has_post_thumbnail() ) : ?>
  27.             <div class="featured-image">
  28.                 <a href="<?php the_permalink(); ?>">
  29.                     <?php the_post_thumbnail( $img_size, $attr = array( 'alt' => the_title_attribute( 'echo=0' ) ) ); ?>
  30.                 </a>
  31.             </div><!--.featured-image-->
  32.         <?php endif;
  33.     endif; ?>
  34.  
  35.     <div class="blog-content">
  36.         <header class="entry-header">
  37.             <?php
  38.             if ( is_single() ) :
  39.                 the_title( '<h1 class="entry-title">', '</h1>' );
  40.             else :
  41.                 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  42.             endif;
  43.             ?>
  44.         </header><!-- .entry-header -->
  45.  
  46.         <div class="entry-content">
  47.                 <?php
  48.                     the_content();
  49.                    
  50.                     wp_link_pages( array(
  51.                         'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'travel-insight-pro' ),
  52.                         'after'  => '</div>',
  53.                     ) );
  54.                 ?>
  55.             <div class="entry-meta">
  56.                 <?php if ( true === $options['blog_views_enable'] ) : ?>
  57.                     <span class="views">
  58.                         <a href="<?php the_permalink(); ?>">
  59.                             <?php
  60.                             echo travel_insight_pro_get_svg( array( 'icon' => 'eye-open') );
  61.                             echo absint( travel_insight_pro_get_post_views( get_the_id() ) );
  62.                             ?>
  63.                         </a>
  64.                     </span><!-- .views -->
  65.                 <?php endif; ?>
  66.                 <span class="comments-link">
  67.                     <?php
  68.                     $comment_display = travel_insight_pro_get_svg( array( 'icon' => 'commenting') ) .  get_comments_number();
  69.                     comments_popup_link( $comment_display, $comment_display, $comment_display, 'comments' );
  70.  
  71.                     travel_insight_pro_entry_footer();
  72.                     ?> 
  73.                 </span>
  74.             </div><!-- .entry-meta -->
  75.         </div><!-- .entry-content -->
  76.     </div><!--.blog-content-->
  77.  
  78. </article><!-- #post-## -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement