Advertisement
Guest User

Elementor Issue - Single.php

a guest
Dec 3rd, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.58 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php while (have_posts()) : the_post();
  4.  
  5.   $featured_image_type = _get_field('csco_featured_image_type', get_the_ID(), 'default');
  6.  
  7.   if ( $featured_image_type == 'default' ) {
  8.     $featured_image_type  = get_theme_mod('authentic_layout_posts_featured_image', 'none');
  9.   }
  10.  
  11.   $post_media_location = _get_field('csco_post_media_location', get_the_ID(), 'content'); ?>
  12.  
  13.   <?php if ($featured_image_type == 'large' || $featured_image_type == 'wide') {
  14.  
  15.     $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_ID(), 'hd'); ?>
  16.  
  17.     <div class="page-header page-header-<?php echo $featured_image_type; ?> page-header-bg overlay parallax" style="background-image: url(<?php echo $thumbnail[0]; ?>)">
  18.       <div class="overlay-container">
  19.         <div class="container">
  20.           <div class="overlay-content">
  21.             <?php the_post_category(); ?>
  22.             <h1><?php the_title(); ?></h1>
  23.             <?php the_post_meta(array('date', 'views', 'reading_time')); ?>
  24.           </div>
  25.         </div>
  26.       </div>
  27.     </div>
  28.  
  29.   <?php } ?>
  30.  
  31.   <?php if ($post_media_location == 'header') { ?>
  32.     <div class="container">
  33.       <?php the_post_media(); ?>
  34.     </div>
  35.   <?php } ?>
  36.  
  37.   <div class="site-content">
  38.     <div class="container">
  39.       <div class="page-content">
  40.         <?php the_sidebar('left'); ?>
  41.         <div class="main">
  42.  
  43.           <article <?php post_class(); ?>>
  44.  
  45.             <?php if ($featured_image_type == 'standard') {
  46.  
  47.               $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_ID(), 'square'); ?>
  48.  
  49.               <div class="page-header page-header-bg overlay overlay-ratio overlay-ratio-horizontal parallax" style="background-image: url(<?php echo $thumbnail[0]; ?>)">
  50.  
  51.                 <div class="overlay-container">
  52.                   <div class="container">
  53.                     <div class="overlay-content">
  54.                       <?php the_post_category(); ?>
  55.                       <h1><?php the_title(); ?></h1>
  56.                       <?php the_post_meta(array('date', 'views', 'reading_time')); ?>
  57.                     </div>
  58.                   </div>
  59.                 </div>
  60.               </div>
  61.             <?php } ?>
  62.  
  63.             <?php if ($featured_image_type == '' || $featured_image_type == 'none') { ?>
  64.               <div class="page-header page-header-standard">
  65.                 <?php the_post_category(); ?>
  66.                 <h1><?php the_title(); ?></h1>
  67.                 <?php the_post_meta(array('date', 'views', 'reading_time')); ?>
  68.               </div>
  69.             <?php } ?>
  70.  
  71.             <?php if ($post_media_location == 'content') { the_post_media(); } ?>
  72.  
  73.             <div class="post-wrap">
  74.               <?php if ( true == get_theme_mod('authentic_layout_posts_share_buttons', true) ) { ?>
  75.               <div class="post-sidebar">
  76.                 <?php the_share_buttons('vertical'); ?>
  77.               </div>
  78.               <?php } ?>
  79.               <div class="post-content">
  80.                 <div class="content">
  81.                   <?php the_content(); ?>
  82.                 </div>
  83.               </div>
  84.             </div>
  85.  
  86.             <?php wp_link_pages(array(
  87.               'before'           => '<div class="navigation pagination"><div class="nav-links">',
  88.               'after'            => '</div></div>',
  89.               'link_before'      => '<span class="page-number">',
  90.               'link_after'       => '</span>',
  91.               'next_or_number'   => 'next_and_number',
  92.               'separator'        => ' ',
  93.               'nextpagelink'     => esc_html__( 'Next page', 'authentic' ),
  94.               'previouspagelink' => esc_html__( 'Previous page', 'authentic' ),
  95.             )); ?>
  96.  
  97.             <?php the_tags( '<ul class="post-tags"><li>', '</li><li>', '</li></ul>' ); ?>
  98.  
  99.             <?php if (get_theme_mod('authentic_meta_author', true) == true) { ?>
  100.               <div class="post-author">
  101.                 <?php echo get_avatar( get_the_author_meta('email'), '120', null, false, array('class' => 'img-circle') ); ?>
  102.                 <h4><?php the_author_posts_link(); ?></h4>
  103.                 <p><?php the_author_meta('description'); ?></p>
  104.                 <?php the_author_accounts_list(); ?>
  105.               </div>
  106.             <?php } ?>
  107.  
  108.           </article>
  109.  
  110.           <?php the_prev_next_posts(); ?>
  111.  
  112.           <?php the_related_posts(); ?>
  113.  
  114.           <?php if ( comments_open() || get_comments_number() ) { comments_template(); }; ?>
  115.  
  116.         </div>
  117.       <?php the_sidebar('right'); ?>
  118.       </div>
  119.     </div>
  120.   </div>
  121.  
  122. <?php endwhile; ?>
  123.  
  124. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement