Advertisement
EduardET

Untitled

Jun 24th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.60 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="main-content">
  4.     <div class="container">
  5.         <div id="content-area" class="clearfix">
  6.             <div id="left-area">
  7.         <?php
  8.             if ( have_posts() ) :
  9.                 while ( have_posts() ) : the_post();
  10.                     $post_format = et_pb_post_format(); ?>
  11.  
  12.                     <article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post clearfix' ); ?>>
  13.                         <div class="wpc-left-box">
  14.  
  15.                 <?php
  16.                     $thumb = '';
  17.  
  18.                     $width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 );
  19.  
  20.                     $height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 );
  21.                     $classtext = 'et_pb_post_main_image';
  22.                     $titletext = get_the_title();
  23.                     $thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' );
  24.                     $thumb = $thumbnail["thumb"];
  25.  
  26.                     et_divi_post_format_content();
  27.  
  28.                     if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) {
  29.                         if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) :
  30.                             printf(
  31.                                 '<div class="et_main_video_container">
  32.                                     %1$s
  33.                                 </div>',
  34.                                 $first_video
  35.                             );
  36.                         elseif ( ! in_array( $post_format, array( 'gallery' ) ) && 'on' === et_get_option( 'divi_thumbnails_index', 'on' ) && '' !== $thumb ) : ?>
  37.                             <a class="entry-featured-image-url" href="<?php the_permalink(); ?>">
  38.                                 <?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?>
  39.                             </a>
  40.                     <?php
  41.                         elseif ( 'gallery' === $post_format ) :
  42.                             et_pb_gallery_images();
  43.                         endif;
  44.                     } ?>
  45.                                     </div>
  46.  
  47.  
  48.                     <div class="wpc-right-box">
  49.                 <?php if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) : ?>
  50.                     <?php if ( ! in_array( $post_format, array( 'link', 'audio' ) ) ) : ?>
  51.                         <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  52.                     <?php endif; ?>
  53.  
  54.                     <?php
  55.                         et_divi_post_meta();
  56.  
  57.                         if ( 'on' !== et_get_option( 'divi_blog_style', 'false' ) || ( is_search() && ( 'on' === get_post_meta( get_the_ID(), '_et_pb_use_builder', true ) ) ) ) {
  58.                             truncate_post( 270 );
  59.                         } else {
  60.                             the_content();
  61.                         }
  62.                     ?>
  63.                 <?php endif; ?>
  64.                 </div>
  65.                     </article> <!-- .et_pb_post -->
  66.             <?php
  67.                     endwhile;
  68.  
  69.                     if ( function_exists( 'wp_pagenavi' ) )
  70.                         wp_pagenavi();
  71.                     else
  72.                         get_template_part( 'includes/navigation', 'index' );
  73.                 else :
  74.                     get_template_part( 'includes/no-results', 'index' );
  75.                 endif;
  76.             ?>
  77.             </div> <!-- #left-area -->
  78.  
  79.             <?php get_sidebar(); ?>
  80.         </div> <!-- #content-area -->
  81.     </div> <!-- .container -->
  82. </div> <!-- #main-content -->
  83.  
  84. <?php
  85.  
  86. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement