Advertisement
Guest User

Untitled

a guest
Feb 8th, 2021
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.09 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <section class="wrapper">
  4.  
  5. <main id="content">
  6.  
  7. <?php
  8. while ( have_posts() ) : the_post(); ?>
  9.  
  10. <div class="breadcrumbs">
  11. <?php esc_attr_e('You are here:', 'cinematix'); ?> <a href="<?php echo home_url(); ?>"><?php esc_attr_e('Home', 'cinematix'); ?></a> / <?php the_category(', ') ?> / <span class="current"><?php the_title(); ?></span>
  12. </div>
  13.  
  14. <h1 class="single-post-title"><?php the_title(); ?></h1>
  15.  
  16. <div class="single-post-details">
  17. <span class="single-post-category"><?php the_category(', ') ?></span>
  18.  
  19. <span class="single-blog-comments"><?php comments_number('0', '1', '%'); ?></span>
  20.  
  21. <?php
  22. if ( shortcode_exists( 'wp_ulike' ) ) {
  23. echo do_shortcode('[wp_ulike]');
  24. } ?>
  25.  
  26. <span class="single-blog-time"><?php echo do_shortcode( '[event post_id="<?php $EM_Event->post_id; ?>"]#_EVENTDATES[/event]' ); ?></span>
  27.  
  28. <div class="clear"></div>
  29.  
  30. </div>
  31.  
  32.  
  33. <?php
  34. if ( has_post_thumbnail() ) { ?>
  35. <div class="thumbnail">
  36. <?php the_post_thumbnail('post-thumbnail-2');
  37. dd_the_post_thumbnail_caption(); ?>
  38. </div>
  39. <?php } else {
  40. // no thumbnail
  41. }
  42. ?>
  43.  
  44.  
  45. <div class="clear"></div>
  46.  
  47. <section class="contrast">
  48.  
  49. <aside id="left">
  50.  
  51. <div class="author-bio">
  52. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  53. <?php
  54. echo get_avatar( get_the_author_meta( 'user_email' ), 100 );
  55. ?>
  56. </a>
  57.  
  58. <h6 class="author-bio-name"><?php echo get_the_author(); ?>
  59.  
  60. <?php $last_name = get_the_author_meta('last_name');
  61. if($last_name != '') { echo '<br>' . $last_name; } ?>
  62.  
  63. </h6>
  64.  
  65. <div class="author-bio-content">
  66. <?php echo get_the_author_meta('description') ?>
  67. </div>
  68.  
  69. </div>
  70.  
  71.  
  72. <div class="single-blog-post-tags">
  73.  
  74. <h6><?php esc_attr_e('Tags:', 'cinematix'); ?></h6>
  75.  
  76. <?php
  77. /* @var $EM_Event EM_Event */
  78. $tags = get_the_terms($EM_Event->post_id, EM_TAXONOMY_TAG);
  79. if( is_array($tags) && count($tags) > 0 ){
  80. $tags_list = array();
  81. foreach($tags as $tag){
  82. $link = get_term_link($tag->slug, EM_TAXONOMY_TAG);
  83. if ( is_wp_error($link) ) $link = '';
  84. $tags_list[] = '<a href="'. $link .'">#'. $tag->name .'</a> ';
  85. }
  86. echo implode('', $tags_list);
  87. } ?>
  88.  
  89. </div>
  90.  
  91. <div class="aside-share">
  92.  
  93. <h6><?php esc_attr_e('Share:', 'cinematix'); ?></h6>
  94.  
  95. <a href="https://twitter.com/share?text=<?php the_title(); ?>&url=<?php the_permalink(); ?>" rel="nofollow" target="_blank"><img class="social" src="<?php echo esc_attr( get_bloginfo( 'stylesheet_directory', 'display' ) ); ?>/img/icon-twitter.svg" alt="Twitter"></a>
  96.  
  97. <a href="http://www.facebook.com/sharer.php?u=<?php global $wp; echo home_url( $wp->request ); ?>&amp;t=<?php wp_title( '|', true, 'right' ); bloginfo( 'name' ); ?>" target="_blank"><img class="social" src="<?php echo esc_attr( get_bloginfo( 'stylesheet_directory', 'display' ) ); ?>/img/icon-facebook.svg" alt="Facebook"></a>
  98.  
  99. <a href="https://www.reddit.com/submit" onclick="window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false" rel="nofollow" target="_blank"><img class="social" src="<?php echo esc_attr( get_bloginfo( 'stylesheet_directory', 'display' ) ); ?>/img/icon-reddit.svg" alt="Reddit"></a>
  100.  
  101. </div>
  102.  
  103. </aside>
  104.  
  105. <article id="text">
  106.  
  107. <?php the_content( esc_attr__('Read more','cinematix') );
  108.  
  109. wp_link_pages( array(
  110. 'before' => '<div class="page-links"><span class="page-links-title">' . esc_attr__( 'Pages:', 'cinematix' ) . '</span>',
  111. 'after' => '</div>',
  112. 'link_before' => '<span>',
  113. 'link_after' => '</span>',
  114. 'pagelink' => '<span class="screen-reader-text">' . esc_attr__( 'Page', 'cinematix' ) . ' </span>%',
  115. 'separator' => '<span class="screen-reader-text">, </span>',
  116. ) );
  117.  
  118. ?>
  119.  
  120. <div class="clear"></div>
  121.  
  122. <?php
  123.  
  124. if ( is_singular( 'attachment' ) ) {
  125. // Parent post navigation.
  126. the_post_navigation( array(
  127. 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'cinematix' ),
  128. ) );
  129. } elseif ( is_singular( 'post' ) ) {
  130. // Previous/next post navigation.
  131. the_post_navigation( array(
  132. 'next_text' => '<span class="meta-nav" aria-hidden="true">' . esc_attr__( 'Next', 'cinematix' ) . '</span> ' .
  133. '<span class="screen-reader-text">' . esc_attr__( 'Next post:', 'cinematix' ) . '</span> ' .
  134. '<span class="post-title">%title</span>',
  135. 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . esc_attr__( 'Previous', 'cinematix' ) . '</span> ' .
  136. '<span class="screen-reader-text">' . esc_attr__( 'Previous post:', 'cinematix' ) . '</span> ' .
  137. '<span class="post-title">%title</span>',
  138. ) );
  139. }
  140.  
  141. // End of the loop.
  142. endwhile;
  143. ?>
  144.  
  145. <div class="clear"></div>
  146.  
  147. </article>
  148.  
  149. </section><!-- contrast -->
  150.  
  151. <?php
  152. // If comments are open or we have at least one comment, load up the comment template.
  153. if ( comments_open() || get_comments_number() ) {
  154. comments_template();
  155. }
  156. ?>
  157.  
  158. </main><!-- content -->
  159.  
  160. <div id="sidebar-spacer"></div>
  161.  
  162. <button id="sidebar-trigger"></button>
  163.  
  164. <aside id="sidebar" class="sidebar">
  165. <button id="sidebar-close"></button>
  166. <?php
  167. $transient = get_transient( 'cinematix_sidebar_single_post' );
  168. if ( false === $transient OR !get_theme_mod( 'cinematix_transient_sidebar_single_post_enable', 0 ) == 1 ) {
  169. ob_start();
  170. if (function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar-single')) : endif;
  171.  
  172. $sidebar = ob_get_clean();
  173. print_r( $sidebar );
  174.  
  175. if ( get_theme_mod( 'cinematix_transient_sidebar_single_post_enable', 0 ) == 1 ) {
  176. set_transient( 'cinematix_sidebar_single_post', $sidebar, MINUTE_IN_SECONDS * get_theme_mod( 'cinematix_transient_sidebar_single_post_expiration', 20 ) );
  177. }
  178.  
  179. } else {
  180. echo '<!-- Transient cinematix_sidebar_single_post ('.get_theme_mod( 'cinematix_transient_sidebar_single_post_expiration', 20 ).' min) -->';
  181. print_r( $transient );
  182. }
  183. ?>
  184. </aside><!--sidebar ends-->
  185.  
  186. </section><!-- .wrapper -->
  187.  
  188.  
  189. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement