Advertisement
Guest User

Untitled

a guest
Jan 20th, 2014
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.93 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <?php
  3.  
  4. $sidebar = get_option(THEME_SHORT_NAME.'_search_archive_sidebar','no-sidebar');
  5. $sidebar_class = '';
  6. if( $sidebar == "left-sidebar" || $sidebar == "right-sidebar"){
  7. $sidebar_class = "sidebar-included " . $sidebar;
  8. }else if( $sidebar == "both-sidebar" ){
  9. $sidebar_class = "both-sidebar-included";
  10. }
  11.  
  12. ?>
  13. <div class="content-wrapper <?php echo $sidebar_class; ?> clearfix">
  14.  
  15. <div class="page-wrapper archive-wrapper">
  16.  
  17. <?php
  18. $left_sidebar = "Search/Archive Left Sidebar";
  19. $right_sidebar = "Search/Archive Right Sidebar";
  20.  
  21. global $gdl_admin_translator;
  22. if( $gdl_admin_translator == 'enable' ){
  23. $translator_continue_reading = get_option(THEME_SHORT_NAME.'_translator_continue_reading', '[...]');
  24. }else{
  25. $translator_continue_reading = __('[...]','gdl_front_end');
  26. }
  27.  
  28. $full_content = get_option(THEME_SHORT_NAME.'_search_archive_full_blog_content', 'No');
  29. $num_excerpt = get_option(THEME_SHORT_NAME.'_search_archive_num_excerpt', 200);
  30. $archive_size = get_option(THEME_SHORT_NAME.'_search_archive_size', '1/2');
  31. $page_background = get_option(THEME_SHORT_NAME.'_search_archive_background','No');
  32.  
  33. $archive_img_size = array(
  34. "1/4" => array("index"=>"0" ,"class"=>"four columns", "size"=>"386x386", "size2"=>"386x386"),
  35. "1/3" => array("index"=>"1" ,"class"=>"one-third column", "size"=>"386x386", "size2"=>"386x386"),
  36. "1/2" => array("index"=>"2" ,"class"=>"eight columns", "size"=>"433x191", "size2"=>"426x188"),
  37. "1/1" => array("index"=>"3" ,"class"=>"sixteen columns", "size"=>"886x300", "size2"=>"586x198")
  38. );
  39.  
  40. $item_class = $archive_img_size[$archive_size]['class'];
  41. if( $sidebar == "left-sidebar" || $sidebar == "right-sidebar" ){
  42. $item_size = $archive_img_size[$archive_size]['size2'];
  43. }else{
  44. $item_size = $archive_img_size[$archive_size]['size'];
  45. }
  46.  
  47. echo "<div class='gdl-page-float-left'>";
  48.  
  49. echo "<div class='gdl-page-item'>";
  50.  
  51. if( $page_background != 'No' ){
  52. echo "<div class='sixteen columns'>";
  53. echo '<div class="page-bkp-frame-wrapper">';
  54. echo '<div class="page-bkp-frame">';
  55. }
  56.  
  57. echo '<div class="blog-item-holder grid-style">';
  58. while( have_posts() ){
  59.  
  60. the_post();
  61.  
  62. if( $post->post_type == 'testimonial' || $post->post_type == 'price_table' || $post->post_type == 'gallery'){ continue; }
  63.  
  64. echo '<div class="blog-item blog-item-grid ' . $item_class . '">';
  65.  
  66. echo '<div class="bkp-frame-wrapper">';
  67. echo '<div class="position-relative">';
  68. echo '<div class="bkp-frame">';
  69.  
  70. // Blog thumbnail media
  71. $thumbnail_type = get_post_meta( get_the_ID(), 'post-option-thumbnail-types', true);
  72. print_gdl_blog_thumbnail( $thumbnail_type, $item_size );
  73.  
  74. echo '<div class="blog-thumbnail-context">';
  75.  
  76. // Blog thumbnail title
  77. echo '<div class="blog-thumbnail-title-wrapper">';
  78. echo '<h2 class="blog-thumbnail-title post-title-color gdl-title">';
  79. echo '<a href="' . get_permalink() . '">' . get_the_title() . '</a>';
  80. echo '</h2>';
  81.  
  82. echo '<div class="blog-thumbnail-comment">';
  83. comments_popup_link( '0', '1', '%', '', '0' );
  84. echo '</div>';
  85. echo '</div>';
  86.  
  87. // Blog thumbnail Content
  88. echo '<div class="blog-thumbnail-content">';
  89. if( $archive_size == '1/1' && $full_content == 'Yes' ){
  90. the_content();
  91. }else{
  92. echo mb_substr( get_the_excerpt(), 0, $num_excerpt );
  93. echo '<a class="blog-continue-reading" href="' . get_permalink() . '">' . $translator_continue_reading . '</a>';
  94. }
  95. echo '</div>';
  96.  
  97. echo '<div class="blog-thumbnail-info post-info-color gdl-divider gdl-info">';
  98. echo '<div class="blog-thumbnail-date">' . get_the_time('d M Y') . '</div>';
  99. $blog_tag_header = '<span class="blog-thumbnail-tag-title">' . __('Tag ','gdl_front_end') . '</span>';
  100. the_tags('<div class="blog-thumbnail-tag">' . $blog_tag_header, ', ' ,'</div>');
  101. echo '<div class="clear"></div>';
  102. echo '</div>';
  103. echo '</div>'; // blog-thumbnail-context
  104.  
  105. echo '</div>'; // bkp-item
  106. echo '</div>'; // position-relative
  107. echo '</div>'; // bkp-item-wrapper
  108.  
  109. echo '</div>'; // blog-item
  110.  
  111. }
  112. echo '</div>'; // blog-item-holder
  113.  
  114. echo '<div class="clear"></div>';
  115.  
  116. pagination();
  117.  
  118. if( $page_background != 'No' ){
  119. echo "<div class='clear'></div>";
  120. echo "</div>"; // page-bkp-frame
  121. echo "</div>"; // page-bkp-frame-wrapper
  122. echo "</div>"; // sixteen-columns
  123. }
  124.  
  125. echo "</div>"; // gdl-page-item
  126.  
  127. get_sidebar('left');
  128.  
  129. echo "</div>"; // gdl-page-float-left
  130.  
  131. get_sidebar('right');
  132. ?>
  133. <br class="clear">
  134. </div>
  135. </div> <!-- content-wrapper -->
  136.  
  137. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement