Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. <?php
  2. /* ----------------------------------------------------------------------------
  3. the attachment template
  4. */
  5.  
  6. get_header();
  7.  
  8.  
  9. //set the template id, used to get the template specific settings
  10. $template_id = 'attachment';
  11.  
  12. //prepare the loop variables
  13. global $loop_sidebar_position;
  14. $loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
  15.  
  16. // sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
  17. $td_sidebar_position = '';
  18. if($loop_sidebar_position == 'sidebar_left') {
  19. $td_sidebar_position = 'td-sidebar-left';
  20. }
  21. ?>
  22.  
  23. <div class="td-main-content-wrap td-container-wrap">
  24. <div class="td-container <?php echo $td_sidebar_position; ?>">
  25. <div class="td-crumb-container">
  26. <?php
  27. if (!empty($post->post_parent) and !empty($post->post_title)) {
  28. echo td_page_generator::get_attachment_breadcrumbs($post->post_parent, $post->post_title);
  29. }
  30. ?>
  31. </div>
  32. <div class="td-pb-row">
  33. <?php
  34. switch ($loop_sidebar_position) {
  35. default:
  36. ?>
  37. <div class="td-pb-span8 td-main-content">
  38. <div class="td-ss-main-content">
  39. <?php
  40. if (is_single()) {?>
  41. <h1 class="entry-title td-page-title">
  42. <span><?php the_title(); ?></span>
  43. </h1><?php
  44. } else {?>
  45. <h1 class="entry-title td-page-title">
  46. <a href="<?php ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
  47. </h1><?php
  48. }
  49.  
  50. get_template_part('loop', 'attachment');
  51. ?>
  52. <div class="td-attachment-prev"><?php previous_image_link(); ?></div>
  53. <div class="td-attachment-next"><?php next_image_link(); ?></div>
  54. </div>
  55. </div>
  56. <div class="td-pb-span4 td-main-sidebar">
  57. <div class="td-ss-main-sidebar">
  58. <?php get_sidebar(); ?>
  59. </div>
  60. </div>
  61. <?php
  62.  
  63. comments_template('', true);
  64.  
  65. break;
  66.  
  67. case 'sidebar_left':
  68. ?>
  69. <div class="td-pb-span8 td-main-content <?php echo $td_sidebar_position; ?>">
  70. <div class="td-ss-main-content">
  71. <?php
  72. if (is_single()) {?>
  73. <h1 class="entry-title td-page-title">
  74. <span><?php the_title(); ?></span>
  75. </h1><?php
  76. } else {?>
  77. <h1 class="entry-title td-page-title">
  78. <a href="<?php ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
  79. </h1><?php
  80. }
  81.  
  82. get_template_part('loop', 'attachment');
  83. ?>
  84. <div class="td-attachment-prev"><?php previous_image_link(); ?></div>
  85. <div class="td-attachment-next"><?php next_image_link(); ?></div>
  86. </div>
  87. </div>
  88. <div class="td-pb-span4 td-main-sidebar">
  89. <div class="td-ss-main-sidebar">
  90. <?php get_sidebar(); ?>
  91. </div>
  92. </div>
  93. <?php
  94.  
  95. comments_template('', true);
  96.  
  97. break;
  98.  
  99. case 'no_sidebar':
  100. ?>
  101. <div class="td-pb-span12 td-main-content">
  102. <div class="td-ss-main-content">
  103. <?php
  104. if (is_single()) {?>
  105. <h1 class="entry-title td-page-title">
  106. <span><?php the_title(); ?></span>
  107. </h1><?php
  108. } else {?>
  109. <h1 class="entry-title td-page-title">
  110. <a href="<?php ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
  111. </h1><?php
  112. }
  113.  
  114. get_template_part('loop', 'attachment');
  115. ?>
  116. <div class="td-attachment-prev"><?php previous_image_link(); ?></div>
  117. <div class="td-attachment-next"><?php next_image_link(); ?></div>
  118. </div>
  119. </div>
  120. <?php
  121.  
  122. comments_template('', true);
  123.  
  124. break;
  125. }
  126. ?>
  127. </div> <!-- /.td-pb-row -->
  128. </div> <!-- /.td-container -->
  129. </div> <!-- /.td-main-content-wrap -->
  130.  
  131. <?php
  132. get_footer();
  133. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement