Guest User

Untitled

a guest
Jul 6th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. <?php
  2. /* ----------------------------------------------------------------------------
  3. the default page template
  4. */
  5.  
  6.  
  7. get_header();
  8.  
  9.  
  10. //set the template id, used to get the template specific settings
  11. $template_id = 'page';
  12.  
  13.  
  14. $loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
  15.  
  16. //get theme panel variable for page comments side wide
  17. $td_enable_or_disable_page_comments = td_util::get_option('tds_disable_comments_pages');
  18.  
  19.  
  20. //read the custom single post settings - this setting overids all of them
  21. $td_page = get_post_meta($post->ID, 'td_page', true);
  22. if (!empty($td_page['td_sidebar_position'])) {
  23. $loop_sidebar_position = $td_page['td_sidebar_position'];
  24. }
  25.  
  26. // sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
  27. $td_sidebar_position = '';
  28. if($loop_sidebar_position == 'sidebar_left') {
  29. $td_sidebar_position = 'td-sidebar-left';
  30. }
  31.  
  32.  
  33. /**
  34. * detect the page builder
  35. */
  36. $td_use_page_builder = false;
  37. if (method_exists('WPBMap', 'getShortCodes')) {
  38. $td_page_builder_short_codes = array_keys(WPBMap::getShortCodes());
  39. if (td_util::strpos_array($post->post_content, $td_page_builder_short_codes) === true) {
  40. $td_use_page_builder = true;
  41. }
  42. }
  43.  
  44. ?>
  45.  
  46.  
  47.  
  48.  
  49. <div class="td-main-content-wrap">
  50. <div class="td-container <?php echo $td_sidebar_position; ?>">
  51. <div class="td-crumb-container">
  52. <?php echo td_page_generator::get_page_breadcrumbs(get_the_title()); ?>
  53. </div>
  54. <div class="td-pb-row">
  55.  
  56. <div class="td-pb-span8 td-main-content" role="main" itemscope="itemscope" itemprop="mainContentOfPage" itemtype="<?php echo td_global::$http_or_https?>://schema.org/CreativeWork">
  57. <div class="td-ss-main-content">
  58. <?php
  59. if (have_posts()) {
  60. while ( have_posts() ) : the_post();
  61. ?>
  62. <div class="td-page-header">
  63. <h1 itemprop="name" class="entry-title td-page-title">
  64. <span><?php the_title() ?></span>
  65. </h1>
  66. </div>
  67. <div class="td-page-content">
  68. <?php
  69. the_content();
  70. endwhile;//end loop
  71.  
  72. }
  73. ?>
  74. </div>
  75.  
  76. </div>
  77. </div>
  78. <div class="td-pb-span4 td-main-sidebar" role="complementary">
  79. <div class="td-ss-main-sidebar">
  80. <?php get_sidebar(); ?>
  81. </div>
  82. </div>
  83.  
  84. </div> <!-- /.td-pb-row -->
  85. </div> <!-- /.td-container -->
  86. </div> <!-- /.td-main-content-wrap -->
  87.  
  88. <?php
  89.  
  90. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment