Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.60 KB | None | 0 0
  1. <?php
  2. global $theme_dditional, $post, $wp_query;
  3.  
  4. if(isset($wp_query->tax_query->queried_terms['advert_category']['terms'][0]{1})){
  5. get_template_part('single-advert');
  6. die();
  7. }
  8.  
  9. $theme_dditional = " Single_page";
  10. if (isset($_GET['lightversion']) || get_theme_mod("site_Identity_layout",'s2') == 's2')
  11. {
  12.  
  13. get_template_part("single","wide");
  14. }
  15. else
  16. {
  17. get_header();
  18. if (!isset($theme_content_width))
  19. $theme_content_width = 1100;
  20.  
  21. $theme_thumbnail = get_the_post_thumbnail( (int)get_the_id(), 'panorama');
  22. preg_match_all('#src="(.*?)"#si', $theme_thumbnail, $theme_thumb_url);
  23. $theme_thumb = "";
  24. if (isset($theme_thumb_url[1][0]))
  25. $theme_thumb = esc_url($theme_thumb_url[1][0]);
  26.  
  27. ?>
  28.  
  29. <?php get_sidebar(); ?>
  30. <div class="site-overlay"></div>
  31. <div id="container" >
  32. <div class="open post_info single_h1">
  33. <h1><?php the_title(); ?><span></span></h1>
  34. <p class="post_info_p"><?php echo esc_html(_e("Lorem ipsum dolor sit amet.","theme"));?></p>
  35. </div>
  36. <div class="item_wide_container">
  37. <div class="container shortcodes">
  38. <div class="row">
  39. <div class="col-md-12 basic">
  40. <div class="place_li_cont">
  41. <div class="post p_style_one open" id="post-<?php (int)the_ID(); ?>" <?php post_class(); ?>>
  42.  
  43.  
  44.  
  45. <div class="post_content">
  46. <?php
  47. if( have_posts()):
  48. while ( have_posts() ) :
  49. the_post();
  50. the_content();
  51. endwhile;
  52. endif;
  53. the_content();
  54. $theme_content = wpautop($post->post_content);
  55. $theme_content = apply_filters('the_content', $theme_content);
  56. ?>
  57. <!--subscribe-->
  58. <?php
  59. if (get_theme_mod('single_post_single_post_control') == false)
  60. { ?>
  61.  
  62.  
  63. <div class="Subscribe">
  64. <div class="div">
  65. <h2 class='edited' id='edited_Subscribe'><?php echo esc_html__("Subscribe now", "theme"); ?></h2>
  66. <form id="subsribe" action="">
  67. <input class="subsribe_email" type="text" placeholder='email@email.com'>
  68. <button type="submit" data-style="zoom-out" class="btn btn-danger button substribe ladda-button ladda-primary"><?php echo esc_html__("Subscribe", "theme"); ?></button>
  69.  
  70. </form>
  71. </div>
  72. </div>
  73. <?php
  74. }
  75. if (!is_page()) { ?>
  76. <div class="p_footer">
  77. <?php $theme_author_id = $post->post_author; ?>
  78. <ul>
  79. <li> <i class="fa fa-globe"></i>
  80. <?php $theme_views = (int)esc_attr(get_option("views_".$post->ID));
  81. echo esc_attr($theme_views++);
  82. update_option( "views_".$post->ID, (int)$theme_views );
  83. ?> </li>
  84. <li><i class="fa fa-tags"></i> <?php the_category(); ?></li>
  85. <li><i class="fa fa-calendar"></i> <?php the_date('m.d.Y'); ?></li>
  86. <li> <?php
  87. if (strlen(esc_html(the_author_meta('description', $post->post_author))) < 1)
  88. {
  89. ?>
  90. <i class="fa fa-user"></i>
  91. <?php
  92. $theme_user_info = get_userdata( (int)$post->post_author);
  93.  
  94. echo esc_html($user_info->display_name);
  95.  
  96.  
  97. }?>
  98. </li>
  99. </ul>
  100.  
  101. </div>
  102.  
  103. <?php
  104. }
  105.  
  106. $theme_args = array(
  107. 'before' => '<p>' . esc_html__('Pages:', "theme"),
  108. 'after' => '</p>',
  109. 'link_before' => '',
  110. 'link_after' => '',
  111. 'next_or_number' => 'number',
  112. 'nextpagelink' => esc_html__('Next page', "theme"),
  113. 'previouspagelink' => esc_html__('Previous page', "theme"),
  114. 'pagelink' => '%',
  115. 'echo' => 0);
  116. wp_link_pages($theme_args);
  117. ?>
  118. </div>
  119. </div>
  120. <?php
  121. if (strlen(esc_html(the_author_meta('description', $post->post_author))) > 0)
  122. {
  123. ?>
  124. <!--author-->
  125. <div class="author">
  126. <?php echo get_avatar(sanitize_text_field($post->post_author)); ?>
  127. <a href="<?php echo '/members/'. esc_url($post->post_author); ?>">
  128. <?php echo esc_html(the_author_meta('user_nicename', $post->post_author)); ?></a>
  129. <span>
  130. <?php echo esc_html(the_author_meta('description', $post->post_author)); ?>
  131. </span>
  132. </div>
  133. <div class="post_content">
  134.  
  135. <?php
  136. }
  137. comments_template();
  138.  
  139. ?>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. <script>function initialize_map(){}</script>
  148. <script>
  149.  
  150.  
  151. jQuery('.post_info ').css({
  152. height :( jQuery(window).height()- jQuery('header').outerHeight(true)) + 'px'
  153. });
  154.  
  155. jQuery(document).ready(function ($) {
  156.  
  157. var height = (jQuery(window).height() - jQuery('header').outerHeight(true)) ;
  158. height = height - 200;
  159. jQuery('.post_info ').css({
  160. height : height + 'px'
  161. });
  162.  
  163.  
  164.  
  165. $(window).resize(function(){
  166. var height = (jQuery(window).height() - jQuery('header').outerHeight(true)) ;
  167. height = height - 200;
  168. jQuery('.post_info ').css({
  169. height : height + 'px'
  170. });
  171.  
  172. });
  173.  
  174. });
  175.  
  176.  
  177.  
  178. </script>
  179. <?php
  180. get_footer();
  181. }
  182. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement