Guest User

Untitled

a guest
Feb 15th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.99 KB | None | 0 0
  1.  
  2. <!doctype html >
  3. <!--[if IE 8]> <html class="ie8" lang="en"> <![endif]-->
  4. <!--[if IE 9]> <html class="ie9" lang="en"> <![endif]-->
  5. <!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
  6. <head>
  7. <title><?php wp_title('|', true, 'right'); ?></title>
  8. <meta charset="<?php bloginfo( 'charset' );?>" />
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  11. <?php
  12. wp_head(); /** we hook up in wp_booster @see td_wp_booster_functions::hook_wp_head */
  13. ?>
  14. </head>
  15.  
  16. <body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">
  17.  
  18. <?php /* scroll to top */?>
  19. <div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>
  20.  
  21. <?php locate_template('parts/menu-mobile.php', true);?>
  22. <?php locate_template('parts/search.php', true);?>
  23.  
  24.  
  25. <style>
  26. @media (max-width: 767px) {
  27. .td-header-desktop-wrap {
  28. display: none;
  29. }
  30. }
  31. @media (min-width: 767px) {
  32. .td-header-mobile-wrap {
  33. display: none;
  34. }
  35. }
  36. .td-main-page-wrap{
  37. padding-top:0!important;
  38.  
  39. }
  40. </style>
  41.  
  42. <div id="td-outer-wrap" class="td-theme-wrap">
  43. <?php //this is closing in the footer.php file ?>
  44.  
  45. <?php
  46.  
  47. if ( td_util::tdc_is_live_editor_iframe() || ( ! td_util::is_template_header() && ! td_util::is_no_header() ) ) {
  48.  
  49. $hide_class = '';
  50. if ( td_util::is_template_header() || td_util::is_no_header() ) {
  51. $hide_class = 'tdc-zone-invisible';
  52. }
  53.  
  54. ?>
  55.  
  56. <div class="tdc-header-wrap <?php echo $hide_class ?>">
  57.  
  58. <?php
  59. /*
  60. * loads the header template set in Theme Panel -> Header area
  61. * the template files are located in ../parts/header
  62. */
  63. td_api_header_style::show_header();
  64. ?>
  65.  
  66. </div>
  67.  
  68. <?php
  69. }
  70.  
  71. if ( td_util::tdc_is_live_editor_iframe() || td_util::is_template_header() ) {
  72.  
  73. $tdc_header_template_content = td_util::get_header_template_content();
  74.  
  75. $hide_class = '';
  76.  
  77. ?>
  78. <div class="td-header-template-wrap" style="position: relative">
  79. <?php
  80.  
  81. if ( empty( $tdc_header_template_content['tdc_header_mobile'] ) ) {
  82. $shortcode = '[tdc_zone type="tdc_header_mobile"][vc_row][vc_column][/vc_column][/vc_row][/tdc_zone]';
  83. $hide_class = 'tdc-zone-invisible';
  84. } else {
  85. $shortcode = $tdc_header_template_content['tdc_header_mobile'];
  86. }
  87.  
  88. ?>
  89. <div class="td-header-mobile-wrap <?php echo $hide_class ?>">
  90. <?php echo do_shortcode( $shortcode ) ?>
  91. </div>
  92. <?php
  93.  
  94. if ( empty( $tdc_header_template_content['tdc_header_mobile_sticky'] ) ) {
  95. $shortcode = '[tdc_zone type="tdc_header_mobile_sticky"][vc_row][vc_column][/vc_column][/vc_row][/tdc_zone]';
  96. } else {
  97. $shortcode = $tdc_header_template_content['tdc_header_mobile_sticky'];
  98. }
  99.  
  100. ?>
  101. <div class="td-header-mobile-sticky-wrap tdc-zone-sticky-invisible tdc-zone-sticky-inactive" style="display: none">
  102. <?php echo do_shortcode( $shortcode ) ?>
  103. </div>
  104. <?php
  105.  
  106. $hide_class = '';
  107.  
  108. if ( empty( $tdc_header_template_content['tdc_header_desktop'] ) ) {
  109. $shortcode = '[tdc_zone type="tdc_header_desktop"][vc_row][vc_column][/vc_column][/vc_row][/tdc_zone]';
  110. $hide_class = 'tdc-zone-invisible';
  111. } else {
  112. $shortcode = $tdc_header_template_content['tdc_header_desktop'];
  113. }
  114.  
  115. ?>
  116.  
  117. <div class="td-header-desktop-wrap <?php echo $hide_class ?>">
  118. <?php echo do_shortcode( $shortcode ) ?>
  119. </div>
  120. <?php
  121.  
  122. if ( empty( $tdc_header_template_content['tdc_header_desktop_sticky'] ) ) {
  123. $shortcode = '[tdc_zone type="tdc_header_desktop_sticky"][vc_row][vc_column][/vc_column][/vc_row][/tdc_zone]';
  124. } else {
  125. $shortcode = $tdc_header_template_content['tdc_header_desktop_sticky'];
  126. }
  127.  
  128. ?>
  129. <div class="td-header-desktop-sticky-wrap tdc-zone-sticky-invisible tdc-zone-sticky-inactive" style="display: none">
  130. <?php echo do_shortcode( $shortcode ) ?>
  131. </div>
  132. </div>
  133. <?php
  134.  
  135. }
  136. ?>
  137.  
  138. <?php
  139.  
  140. do_action('td_wp_booster_after_header'); //used by unique articles
  141.  
  142.  
  143.  
  144. //set the template id, used to get the template specific settings
  145. $template_id = 'page';
  146.  
  147.  
  148. $loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
  149.  
  150. //get theme panel variable for page comments side wide
  151. $td_enable_or_disable_page_comments = td_util::get_option('tds_disable_comments_pages');
  152.  
  153.  
  154. //read the custom single post settings - this setting overids all of them
  155. $td_page = td_util::get_post_meta_array($post->ID, 'td_page');
  156. if (!empty($td_page['td_sidebar_position'])) {
  157. $loop_sidebar_position = $td_page['td_sidebar_position'];
  158. }
  159.  
  160. // sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
  161. $td_sidebar_position = '';
  162. if($loop_sidebar_position == 'sidebar_left') {
  163. $td_sidebar_position = 'td-sidebar-left';
  164. }
  165.  
  166. // check if buddypress is active
  167. $is_buddypress_template = function_exists( 'is_buddypress' ) ? is_buddypress() : false;
  168.  
  169.  
  170. /**
  171. * detect the page builder
  172. */
  173. $td_use_page_builder = td_global::is_page_builder_content();
  174.  
  175.  
  176.  
  177. if ($td_use_page_builder) {
  178.  
  179. // the page is rendered using the page builder template (no sidebars)
  180. if (have_posts()) { ?>
  181. <?php while ( have_posts() ) : the_post(); ?>
  182.  
  183. <div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
  184. <div class="<?php if (!td_util::tdc_is_installed()) { echo 'td-container '; } ?>tdc-content-wrap">
  185. <?php the_content(); ?>
  186. </div>
  187. <?php
  188. if($td_enable_or_disable_page_comments == 'show_comments') {
  189. ?>
  190. <div class="td-container">
  191. <div class="td-pb-row">
  192. <div class="td-pb-span12">
  193. <?php comments_template('', true); ?>
  194. </div>
  195. </div>
  196. </div>
  197. <?php
  198. }
  199. ?>
  200. </div> <!-- /.td-main-content-wrap -->
  201.  
  202.  
  203. <?php endwhile; ?>
  204. <?php }
  205. } else {
  206.  
  207. //no page builder detected, we load a default page template with sidebar / no sidebar
  208. ?>
  209.  
  210.  
  211. <div class="td-main-content-wrap td-container-wrap">
  212. <div class="td-container tdc-content-wrap <?php echo $td_sidebar_position; ?>">
  213. <div class="td-crumb-container">
  214. <?php echo td_page_generator::get_page_breadcrumbs(get_the_title()); ?>
  215. </div>
  216. <div class="td-pb-row">
  217. <?php
  218. switch ($loop_sidebar_position) {
  219. default:
  220. ?>
  221. <div class="td-pb-span8 td-main-content" role="main">
  222. <div class="td-ss-main-content">
  223. <?php
  224. if (have_posts()) {
  225. while ( have_posts() ) : the_post();
  226. ?>
  227. <div class="td-page-header">
  228. <h1 class="entry-title td-page-title">
  229. <span><?php the_title() ?></span>
  230. </h1>
  231. </div>
  232. <div class="td-page-content">
  233. <?php
  234. the_content();
  235. endwhile;//end loop
  236.  
  237. }
  238. ?>
  239. </div>
  240. <?php
  241. //Display comments when we are not on buddypress template; when buddypress is true do nothing
  242. if ($is_buddypress_template === false) {
  243. if($td_enable_or_disable_page_comments == 'show_comments') {
  244. comments_template('', true);
  245. }
  246. } ?>
  247. </div>
  248. </div>
  249. <div class="td-pb-span4 td-main-sidebar" role="complementary">
  250. <div class="td-ss-main-sidebar">
  251. <?php get_sidebar(); ?>
  252. </div>
  253. </div>
  254. <?php
  255. break;
  256.  
  257. case 'sidebar_left':
  258. ?>
  259. <div class="td-pb-span8 td-main-content <?php echo $td_sidebar_position; ?>-content" role="main">
  260. <div class="td-ss-main-content">
  261. <?php
  262.  
  263. if (have_posts()) {
  264. while ( have_posts() ) : the_post();
  265. ?>
  266. <div class="td-page-header">
  267. <h1 class="entry-title td-page-title">
  268. <span><?php the_title() ?></span>
  269. </h1>
  270. </div>
  271. <div class="td-page-content">
  272. <?php
  273. the_content();
  274. endwhile; //end loop
  275. }
  276. ?>
  277. </div>
  278. <?php
  279. //Display comments when we are not on buddypress template; when buddypress is true do nothing
  280. if ($is_buddypress_template === false) {
  281. if($td_enable_or_disable_page_comments == 'show_comments') {
  282. comments_template('', true);
  283. }
  284. } ?>
  285. </div>
  286. </div>
  287. <div class="td-pb-span4 td-main-sidebar" role="complementary">
  288. <div class="td-ss-main-sidebar">
  289. <?php get_sidebar(); ?>
  290. </div>
  291. </div>
  292. <?php
  293. break;
  294.  
  295. case 'no_sidebar':
  296. ?>
  297. <div class="td-pb-span12 td-main-content" role="main">
  298.  
  299. <?php
  300. if (have_posts()) {
  301. while ( have_posts() ) : the_post();
  302. ?>
  303. <div class="td-page-header">
  304. <h1 class="entry-title td-page-title">
  305. <span><?php the_title() ?></span>
  306. </h1>
  307. </div>
  308. <div class="td-page-content">
  309. <?php
  310. the_content();
  311. endwhile; //end loop
  312. }
  313. ?>
  314. </div>
  315. <?php
  316. //Display comments when we are not on buddypress template; when buddypress is true do nothing
  317. if ($is_buddypress_template === false) {
  318. if($td_enable_or_disable_page_comments == 'show_comments') {
  319. comments_template('', true);
  320. }
  321. } ?>
  322. </div>
  323. <?php
  324. break;
  325. }
  326. ?>
  327. </div> <!-- /.td-pb-row -->
  328. </div> <!-- /.td-container -->
  329. </div> <!-- /.td-main-content-wrap -->
  330.  
  331. <?php
  332. }
  333. ?>
  334.  
  335.  
  336. </div><!--close td-outer-wrap-->
  337.  
  338. <?php wp_footer(); ?>
  339.  
  340. </body>
  341. </html>
Advertisement
Add Comment
Please, Sign In to add comment