EduardET

Untitled

Mar 7th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.43 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div id="main-content">
  3.     <?php
  4.         if ( et_builder_is_product_tour_enabled() ):
  5.  
  6.             while ( have_posts() ): the_post(); ?>
  7.  
  8.                 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  9.                     <div class="entry-content">
  10.                     <?php
  11.                         the_content();
  12.                     ?>
  13.                     </div> <!-- .entry-content -->
  14.  
  15.                 </article> <!-- .et_pb_post -->
  16.  
  17.         <?php endwhile;
  18.         else:
  19.     ?>
  20.     <div class="container">
  21.         <div id="content-area" class="clearfix">
  22.             <div class="et_pb_extra_column_main">
  23.                 <?php
  24.                 do_action( 'et_before_post' );
  25.  
  26.                 if ( have_posts() ) :
  27.                     while ( have_posts() ) : the_post(); ?>
  28.                         <?php
  29.                             $post_category_color = extra_get_post_category_color();
  30.                         ?>
  31.                         <article id="post-<?php the_ID(); ?>" <?php post_class( 'module single-post-module' ); ?>>
  32.                             <?php if ( is_post_extra_title_meta_enabled() ) { ?>
  33.                             <div class="post-header">
  34.                                 <h1 class="entry-title"><?php the_title(); ?></h1>
  35.                                 <div class="post-meta vcard">
  36.                                     <p><?php echo extra_display_single_post_meta(); ?></p>
  37.                                 </div>
  38.                             </div>
  39.                             <?php } ?>
  40.  
  41.                             <?php if ( ( et_has_post_format() && et_has_format_content() ) || ( has_post_thumbnail() && is_post_extra_featured_image_enabled() ) ) { ?>
  42.                             <div class="post-thumbnail header">
  43.                                 <?php
  44.                                 $score_bar = extra_get_the_post_score_bar();
  45.                                 $thumb_args = array( 'size' => 'wpc-extra-full', 'link_wrapped' => false );
  46.                                 require locate_template( 'post-top-content.php' );
  47.                                 ?>
  48.                             </div>
  49.                             <?php } ?>
  50.  
  51.                             <?php $post_above_ad = extra_display_ad( 'post_above', false ); ?>
  52.                             <?php if ( !empty( $post_above_ad ) ) { ?>
  53.                             <div class="et_pb_extra_row etad post_above">
  54.                                 <?php echo $post_above_ad; ?>
  55.                             </div>
  56.                             <?php } ?>
  57.  
  58.                             <div class="post-wrap">
  59.                             <?php if ( !extra_is_builder_built() ) { ?>
  60.                                 <div class="post-content entry-content">
  61.                                     <?php the_content(); ?>
  62.                                     <?php
  63.                                         wp_link_pages( array(
  64.                                             'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'extra' ),
  65.                                             'after'  => '</div>',
  66.                                         ) );
  67.                                     ?>
  68.                                 </div>
  69.                             <?php } else { ?>
  70.                                 <?php et_builder_set_post_type(); ?>
  71.                                 <?php the_content(); ?>
  72.                             <?php } ?>
  73.                             </div>
  74.                             <?php if ( $review = extra_post_review() ) { ?>
  75.                             <div class="post-wrap post-wrap-review">
  76.                                 <div class="review">
  77.                                     <div class="review-title">
  78.                                         <h3><?php echo esc_html( $review['title'] ); ?></h3>
  79.                                     </div>
  80.                                     <div class="review-content">
  81.                                         <div class="review-summary clearfix">
  82.                                             <div class="review-summary-score-box" style="background-color:<?php echo esc_attr( $post_category_color ); ?>">
  83.                                                 <h4><?php printf( et_get_safe_localization( __( '%d%%', 'extra' ) ), absint( $review['score'] ) ); ?></h4>
  84.                                             </div>
  85.                                             <div class="review-summary-content">
  86.                                                 <?php if ( !empty( $review['summary'] ) ) { ?>
  87.                                                 <p>
  88.                                                     <?php if ( !empty( $review['summary_title'] ) ) { ?>
  89.                                                         <strong><?php echo esc_html( $review['summary_title'] ); ?></strong>
  90.                                                     <?php } ?>
  91.                                                     <?php echo $review['summary']; ?>
  92.                                                 </p>
  93.                                                 <?php } ?>
  94.                                             </div>
  95.                                         </div>
  96.                                         <div class="review-breakdowns">
  97.                                             <?php foreach ( $review['breakdowns'] as $breakdown ) { ?>
  98.                                             <div class="review-breakdown">
  99.                                                 <h5 class="review-breakdown-title"><?php echo esc_html( $breakdown['title'] ); ?></h5>
  100.                                                 <div class="score-bar-bg">
  101.                                                     <span class="score-bar" style="background-color:<?php echo esc_attr( $post_category_color ); ?>; width:<?php printf( '%d%%', max( 4, absint( $breakdown['rating'] ) ) );  ?>">
  102.                                                         <span class="score-text"><?php printf( et_get_safe_localization( __( '%d%%', 'extra' ) ), absint( $breakdown['rating'] ) ); ?></span>
  103.                                                     </span>
  104.                                                 </div>
  105.                                             </div>
  106.                                             <?php } ?>
  107.                                         </div>
  108.                                     </div>
  109.                                 </div>
  110.                             </div>
  111.                             <?php } ?>
  112.                             <div class="post-footer">
  113.                                 <div class="social-icons ed-social-share-icons">
  114.                                     <p class="share-title"><?php esc_html_e( 'Share:', 'extra' ); ?></p>
  115.                                     <?php extra_post_share_links(); ?>
  116.                                 </div>
  117.                                 <?php if ( extra_is_post_rating_enabled() ) { ?>
  118.                                 <div class="rating-stars">
  119.                                     <?php extra_rating_stars_display(); ?>
  120.                                 </div>
  121.                                 <?php } ?>
  122.                                 <style type="text/css" id="rating-stars">
  123.                                     .post-footer .rating-stars #rated-stars img.star-on,
  124.                                     .post-footer .rating-stars #rating-stars img.star-on {
  125.                                         background-color: <?php echo esc_html( $post_category_color ); ?>;
  126.                                     }
  127.                                 </style>
  128.                             </div>
  129.  
  130.                             <?php $post_below_ad = extra_display_ad( 'post_below', false ); ?>
  131.                             <?php if ( !empty( $post_below_ad ) ) { ?>
  132.                             <div class="et_pb_extra_row etad post_below">
  133.                                 <?php echo $post_below_ad; ?>
  134.                             </div>
  135.                             <?php } ?>
  136.                         </article>
  137.  
  138.                         <nav class="post-nav">
  139.                             <div class="nav-links clearfix">
  140.                                 <div class="nav-link nav-link-prev">
  141.                                     <?php previous_post_link( '%link', et_get_safe_localization( __( '<span class="button">Previous</span><span class="title">%title</span>', 'extra' ) ) ); ?>
  142.                                 </div>
  143.                                 <div class="nav-link nav-link-next">
  144.                                     <?php next_post_link( '%link', et_get_safe_localization( __( '<span class="button">Next</span><span class="title">%title</span>', 'extra' ) ) ); ?>
  145.                                 </div>
  146.                             </div>
  147.                         </nav>
  148.                         <?php
  149.                         if ( extra_is_post_author_box() ) { ?>
  150.                         <div class="et_extra_other_module author-box vcard">
  151.                             <div class="author-box-header">
  152.                                 <h3><?php esc_html_e( 'About The Author', 'extra' ); ?></h3>
  153.                             </div>
  154.                             <div class="author-box-content clearfix">
  155.                                 <div class="author-box-avatar">
  156.                                     <?php echo get_avatar( get_the_author_meta( 'user_email' ), 170, 'mystery', esc_attr( get_the_author() ) ); ?>
  157.                                 </div>
  158.                                 <div class="author-box-description">
  159.                                     <h4><a class="author-link url fn" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author" title="<?php printf( et_get_safe_localization( __( 'View all posts by %s', 'extra' ) ), get_the_author() ); ?>"><?php echo get_the_author(); ?></a></h4>
  160.                                     <p class="note"><?php the_author_meta( 'description' ); ?></p>
  161.                                     <ul class="social-icons">
  162.                                         <?php foreach ( extra_get_author_contact_methods() as $method ) { ?>
  163.                                             <li><a href="<?php echo esc_url( $method['url'] ); ?>" target="_blank"><span class="et-extra-icon et-extra-icon-<?php echo esc_attr( $method['slug'] ); ?> et-extra-icon-color-hover"></span></a></li>
  164.                                         <?php } ?>
  165.                                     </ul>
  166.                                 </div>
  167.                             </div>
  168.                         </div>
  169.                         <?php } ?>
  170.  
  171.                         <?php
  172.                         $related_posts = extra_get_post_related_posts();
  173.  
  174.                         if ( $related_posts && extra_is_post_related_posts() ) {  ?>
  175.                         <div class="et_extra_other_module related-posts">
  176.                             <div class="related-posts-header">
  177.                                 <h3><?php esc_html_e( 'Related Posts', 'extra' ); ?></h3>
  178.                             </div>
  179.                             <div class="related-posts-content clearfix">
  180.                                 <?php while ( $related_posts->have_posts() ) : $related_posts->the_post(); ?>
  181.                                 <div class="related-post">
  182.                                     <div class="featured-image"><?php
  183.                                     echo et_extra_get_post_thumb( array(
  184.                                         'size'                       => 'extra-image-small',
  185.                                         'a_class'                    => array('post-thumbnail'),
  186.                                         'post_format_thumb_fallback' => true,
  187.                                         'img_after'                  => '<span class="et_pb_extra_overlay"></span>',
  188.                                     ));
  189.                                     ?></div>
  190.                                     <h4 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
  191.                                     <p class="date"><?php extra_the_post_date(); ?></p>
  192.                                 </div>
  193.                                 <?php endwhile; ?>
  194.                                 <?php wp_reset_postdata(); ?>
  195.                             </div>
  196.                         </div>
  197.                         <?php } ?>
  198.                 <?php
  199.                     endwhile;
  200.                 else :
  201.                     ?>
  202.                     <h2><?php esc_html_e( 'Post not found', 'extra' ); ?></h2>
  203.                     <?php
  204.                 endif;
  205.                 wp_reset_query();
  206.  
  207.                 do_action( 'et_after_post' );
  208.                 ?>
  209.  
  210.                 <?php
  211.                 if ( ( comments_open() || get_comments_number() ) && 'on' == et_get_option( 'extra_show_postcomments', 'on' ) ) {
  212.                     comments_template( '', true );
  213.                 }
  214.                 ?>
  215.             </div><!-- /.et_pb_extra_column.et_pb_extra_column_main -->
  216.  
  217.             <?php get_sidebar(); ?>
  218.  
  219.         </div> <!-- #content-area -->
  220.     </div> <!-- .container -->
  221.     <?php endif; ?>
  222. </div> <!-- #main-content -->
  223.  
  224. <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment