Advertisement
BackuPs-nl

rt-18-archive posts have featured image

Apr 27th, 2016
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.58 KB | None | 0 0
  1. <?php
  2. #
  3. # rt-theme
  4. # post content for standart post types in listing pages
  5. #
  6. global $rt_list_style, $more, $rt_global_post_values;
  7.  
  8.  
  9. //extract global values
  10. extract( $rt_global_post_values );
  11.  
  12. // Create thumbnail image
  13. $thumbnail_image_output = ! empty( $featured_image_id ) ? get_resized_image_output( array( "image_url" => "", "image_id" => $featured_image_id, "w" => $featured_image_width, "h" => $featured_image_height, "crop" => $crop ) ) : "";
  14.  
  15. // Tiny image thumbnail for lightbox gallery feature
  16. $lightbox_thumbnail = ! empty( $featured_image_id ) ? rt_vt_resize( $featured_image_id, "", 75, 50, true ) : rt_vt_resize( $featured_image_id, "", 75, 50, true );
  17. $lightbox_thumbnail = is_array( $lightbox_thumbnail ) ? $lightbox_thumbnail["url"] : "" ;
  18.  
  19. $rt_list_style = "style3";
  20. ?>
  21.    
  22. <!-- blog box-->
  23. <article class="blog_list loop" id="post-<?php the_ID(); ?>">
  24.  
  25.     <?php if( $rt_list_style == "style1" ):?>
  26.     <section class="first_section">    
  27.         <div class="date_box"><span class="day"><?php the_time("d") ?></span><span class="year"><?php the_time("M") ?> <?php the_time("Y") ?></span></div>
  28.     </section>
  29.     <?php endif;?>
  30.  
  31.  
  32.     <section class="article_section <?php if( $rt_list_style != "style1" ):?>with_icon<?php endif;?>">
  33.        
  34.         <div class="blog-head-line clearfix">    
  35.  
  36.             <div class="post-title-holder">
  37.  
  38.                 <!-- blog headline-->
  39.                 <?php if( $rt_list_style == "style2" ):?><h2 class="icon-pencil"><?php else:?><h2><?php endif;?><a href="<?php echo $permalink ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  40.                 <!-- / blog headline-->
  41.  
  42.                 <?php do_action( "post_meta_bar" )?>
  43.  
  44.             </div><!-- / end div  .post-title-holder -->
  45.            
  46.         </div><!-- / end div  .blog-head-line -->  
  47.  
  48.  
  49.         <?php if( ! empty( $thumbnail_image_output )  ):?>
  50.             <div class="imgeffect align<?php echo $featured_image_position;?>">
  51.                     <?php
  52.                         //create lightbox link
  53.                         do_action("create_lightbox_link",
  54.                             array(
  55.                                 'class'          => 'icon-zoom-in lightbox_',
  56.                                 'href'           => $featured_image_url,
  57.                                 'title'          => __('Enlarge Image','rt_theme'),
  58.                                 'data_group'     => 'image_'.$featured_image_id,
  59.                                 'data_title'     => $title,                                                
  60.                                 'data_thumbnail' => $lightbox_thumbnail,
  61.                             )
  62.                         );
  63.                     ?>
  64.  
  65.                     <a href="<?php echo $permalink;?>" class="icon-link" title="<?php echo $title; ?>" rel="bookmark" ></a>
  66.  
  67.                     <?php echo $thumbnail_image_output; ?>
  68.  
  69.             </div>
  70.         <?php endif;?>     
  71.  
  72.         <?php the_excerpt( __( 'Continue reading', 'rt_theme' ) ); ?>        
  73.  
  74.     </section>
  75.  
  76. </article>
  77. <!-- / blog box-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement