Guest User

template 7

a guest
Jun 6th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.65 KB | None | 0 0
  1. <?php
  2. // Template 7 -post-final-7.psd - full image background
  3. //get the global sidebar position from td_single_template_vars.php
  4.  
  5. locate_template('includes/wp_booster/td_single_template_vars.php', true);
  6.  
  7. get_header();
  8.  
  9. global $loop_sidebar_position, $td_sidebar_position, $post;
  10.  
  11. $td_mod_single = new td_module_single($post);
  12. if (empty($td_post_featured_image = td_util::get_featured_image_src($post->ID, 'full'))) {$td_post_featured_image='http://localhost/test/wp-content/uploads/2018/05/11.jpg';}
  13. else {$td_post_featured_image = td_util::get_featured_image_src($post->ID, 'full');}
  14.  
  15. if (!empty($td_post_featured_image)) {
  16.  
  17. td_js_buffer::add_to_footer(
  18. 'jQuery(window).ready(function() {' . "\r\n" .
  19. '(function(){' . "\r\n" .
  20. 'var td_backstr_item = new tdBackstr.item();' . "\r\n" .
  21.  
  22. 'td_backstr_item.wrapper_image_jquery_obj = jQuery( "#td-full-screen-header-image" );' . "\r\n" .
  23. 'td_backstr_item.image_jquery_obj = td_backstr_item.wrapper_image_jquery_obj.find( \'img:first\' );' . "\r\n" .
  24.  
  25. 'tdBackstr.add_item( td_backstr_item );' . "\r\n" .
  26.  
  27. "jQuery('.td-read-down a').click(function(event){" . "\r\n" .
  28. "event.preventDefault();" . "\r\n" .
  29. "var header_wrap = jQuery( '.td-full-screen-header-image-wrap:first' )" . "\r\n" .
  30. "if ( 1 === header_wrap.length ) {" . "\r\n" .
  31. "tdUtil.scrollToPosition(header_wrap.height() + header_wrap.offset().top, 1200);" . "\r\n" .
  32. "}" . "\r\n" .
  33. "});" . "\r\n" .
  34. '})();' . "\r\n" .
  35. '});'
  36. );
  37. }
  38.  
  39. ?>
  40.  
  41. <article id="post-<?php echo $td_mod_single->post->ID;?>" class="<?php echo join(' ', get_post_class('td-post-template-7'));?> td-container-wrap" <?php echo $td_mod_single->get_item_scope();?>>
  42.  
  43. <div class="td-full-screen-header-image-wrap">
  44.  
  45. <div class="td-container td-post-header">
  46. <div class="td-crumb-container"><?php echo td_page_generator::get_single_breadcrumbs($td_mod_single->title); ?></div>
  47.  
  48. <div class="td-post-header-holder">
  49.  
  50. <div class="td-parallax-header">
  51.  
  52. <header class="td-post-title">
  53.  
  54. <?php echo $td_mod_single->get_category(); ?>
  55. <?php echo $td_mod_single->get_title();?>
  56.  
  57.  
  58. <?php if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) { ?>
  59. <p class="td-post-sub-title"><?php echo $td_mod_single->td_post_theme_settings['td_subtitle']; ?></p>
  60. <?php } ?>
  61.  
  62. <div class="td-module-meta-info">
  63. <?php echo $td_mod_single->get_author();?>
  64. <?php echo $td_mod_single->get_date(false);?>
  65. <?php echo $td_mod_single->get_views();?>
  66. <?php echo $td_mod_single->get_comments();?>
  67. </div>
  68.  
  69. </header>
  70.  
  71. <div class="td-read-down"><a href="#"><i class="td-icon-read-down"></i></a></div>
  72. </div>
  73. </div>
  74.  
  75. </div>
  76.  
  77. <div id="td-full-screen-header-image" class="td-image-gradient-style7">
  78. <img class="td-backstretch" src="<?php echo $td_post_featured_image; ?>">
  79. </div>
  80. </div>
  81.  
  82. <div class="td-container">
  83. <div class="td-pb-row">
  84. <?php
  85.  
  86. //the default template
  87. switch ($loop_sidebar_position) {
  88. default:
  89. ?>
  90. <div class="td-pb-span8 td-main-content" role="main">
  91. <div class="td-ss-main-content">
  92. <?php
  93. locate_template('loop-single-7.php', true);
  94. comments_template('', true);
  95. ?>
  96. </div>
  97. </div>
  98. <div class="td-pb-span4 td-main-sidebar" role="complementary">
  99. <div class="td-ss-main-sidebar">
  100. <?php get_sidebar(); ?>
  101. </div>
  102. </div>
  103. <?php
  104. break;
  105.  
  106. case 'sidebar_left':
  107. ?>
  108. <div class="td-pb-span8 td-main-content <?php echo $td_sidebar_position; ?>-content" role="main">
  109. <div class="td-ss-main-content">
  110. <?php
  111. locate_template('loop-single-7.php', true);
  112. comments_template('', true);
  113. ?>
  114. </div>
  115. </div>
  116. <div class="td-pb-span4 td-main-sidebar" role="complementary">
  117. <div class="td-ss-main-sidebar">
  118. <?php get_sidebar(); ?>
  119. </div>
  120. </div>
  121. <?php
  122. break;
  123.  
  124. case 'no_sidebar':
  125. ?>
  126. <div class="td-pb-span12 td-main-content" role="main">
  127. <div class="td-ss-main-content">
  128. <?php
  129. locate_template('loop-single-7.php', true);
  130. comments_template('', true);
  131. ?>
  132. </div>
  133. </div>
  134. <?php
  135. break;
  136.  
  137. }
  138. ?>
  139. </div> <!-- /.td-pb-row -->
  140. </div> <!-- /.td-container -->
  141. </article> <!-- /.post -->
  142.  
  143. <?php
  144.  
  145. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment