Advertisement
Guest User

ghostpool_theme_search

a guest
Jun 23rd, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.34 KB | None | 0 0
  1. <?php get_header();
  2.  
  3. // Page options
  4. $format = ghostpool_option( 'search_format' );
  5. $image_size_standard = ghostpool_option( 'search_standard_post_image_size' );
  6. $image_size_hub = ghostpool_option( 'search_hub_image_size' );
  7. $image_size_review = ghostpool_option( 'search_review_image_size' );
  8. $image_size_preview = ghostpool_option( 'search_preview_image_size' );
  9. $content_display = ghostpool_option( 'search_content_display' );
  10. $excerpt_length = ghostpool_option( 'search_excerpt_length' );
  11. $meta_release_date = ghostpool_option( 'search_meta', 'release_date' );
  12. $meta_author = ghostpool_option( 'search_meta', 'author' );
  13. $meta_date = ghostpool_option( 'search_meta', 'date' );
  14. $meta_comment_count = ghostpool_option( 'search_meta', 'comment_count' );
  15. $meta_views = ghostpool_option( 'search_meta', 'views' );
  16. $meta_likes = ghostpool_option( 'search_meta', 'likes' );
  17. $meta_followers = ghostpool_option( 'search_meta', 'followers' );
  18. $meta_cats = ghostpool_option( 'search_meta', 'cats' );
  19. $meta_tags = ghostpool_option( 'search_meta', 'tags' );
  20. $meta_hub_fields = ghostpool_option( 'search_meta', 'hub_fields' );
  21. $meta_site_rating = ghostpool_option( 'search_meta', 'site_rating' );
  22. $meta_user_rating = ghostpool_option( 'search_meta', 'user_rating' );
  23. $read_more_link = ghostpool_option( 'search_read_more_link' );
  24.  
  25. if ( ! is_array( ghostpool_option( 'search_post_types' ) ) ) {
  26. $post_types = array( ghostpool_option( 'search_post_types' ) );
  27. } else {
  28. $post_types = ghostpool_option( 'search_post_types' );
  29. }
  30.  
  31. if ( ! is_array( ghostpool_option( 'search_templates' ) ) ) {
  32. $templates = array( ghostpool_option( 'search_templates' ) );
  33. } else {
  34. $templates = ghostpool_option( 'search_templates' );
  35. }
  36.  
  37. ?>
  38.  
  39. <?php ghostpool_page_title( '', ghostpool_option( 'search_page_header' ) ); ?>
  40.  
  41. <?php ghostpool_page_header(
  42. $post_id = '',
  43. $type = ghostpool_option( 'search_page_header' ),
  44. $bg = ghostpool_option( 'search_page_header_bg' ),
  45. $height = ghostpool_option( 'search_page_header_height', 'padding-bottom' )
  46. ); ?>
  47.  
  48. <div id="gp-content-wrapper" class="gp-container">
  49.  
  50. <?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
  51.  
  52. <div id="gp-inner-container">
  53.  
  54. <div id="gp-left-column">
  55.  
  56. <div id="gp-content">
  57.  
  58. <?php if ( ghostpool_option( 'search_page_header' ) == 'gp-fullwidth-page-header' OR ghostpool_option( 'search_page_header' ) == 'gp-full-page-page-header' ) { ?>
  59. <?php ghostpool_breadcrumbs(); ?>
  60. <header class="gp-entry-header">
  61. <h1 class="gp-entry-title">
  62. <?php if ( isset( $_GET['s'] ) && ( $_GET['s'] != '' ) ) { ?>
  63. <?php echo absint( $wp_query->found_posts ); ?> <?php esc_html_e( 'search results for', 'huber' ); ?> "<?php echo esc_attr( $s ); ?>"
  64. <?php } else { ?>
  65. <?php esc_html_e( 'Search', 'huber' ); ?>
  66. <?php } ?>
  67. </h1>
  68. </header>
  69. <?php } ?>
  70.  
  71. <?php if ( isset( $_GET['s'] ) && ( $_GET['s'] != '' ) ) { ?>
  72.  
  73. <div class="gp-blog-wrapper gp-archive-wrapper <?php echo sanitize_html_class( ghostpool_option( 'search_format' ) ); ?>" data-type="search" data-format="<?php echo esc_attr( ghostpool_option( 'search_format' ) ); ?>" data-posttypes="<?php echo esc_attr( implode( ',', $post_types ) ); ?>" data-templates="<?php echo esc_attr( implode( ',', $templates ) ); ?>" data-orderby="<?php echo esc_attr( ghostpool_option( 'search_orderby' ) ); ?>" data-perpage="<?php echo absint( ghostpool_option( 'search_per_page' ) ); ?>" data-offset="<?php echo esc_attr( ghostpool_option( 'search_offset' ) ); ?>" data-imagesizestandard="<?php echo esc_attr( $image_size_standard ); ?>" data-imagesizehub="<?php echo esc_attr( $image_size_hub ); ?>" data-imagesizereview="<?php echo esc_attr( $image_size_review ); ?>" data-imagesizepreview="<?php echo esc_attr( $image_size_preview ); ?>" data-contentdisplay="<?php echo esc_attr( ghostpool_option( 'search_content_display' ) ); ?>" data-excerptlength="<?php echo absint( ghostpool_option( 'search_excerpt_length' ) ); ?>" data-metareleasedate="<?php echo esc_attr( ghostpool_option( 'search_meta', 'release_date' ) ); ?>" data-metaauthor="<?php echo esc_attr( ghostpool_option( 'search_meta', 'author' ) ); ?>" data-metadate="<?php echo esc_attr( ghostpool_option( 'search_meta', 'date' ) ); ?>" data-metacommentcount="<?php echo esc_attr( ghostpool_option( 'search_meta', 'comment_count' ) ); ?>" data-metaviews="<?php echo esc_attr( ghostpool_option( 'search_meta', 'views' ) ); ?>" data-metalikes="<?php echo esc_attr( ghostpool_option( 'search_meta', 'likes' ) ); ?>" data-metafollowers="<?php echo esc_attr( ghostpool_option( 'search_meta', 'followers' ) ); ?>" data-metacats="<?php echo esc_attr( ghostpool_option( 'search_meta', 'cats' ) ); ?>" data-metatags="<?php echo esc_attr( ghostpool_option( 'search_meta', 'tags' ) ); ?>" data-metahubfields="<?php echo esc_attr( ghostpool_option( 'search_meta', 'hub_fields' ) ); ?>" data-metasiterating="<?php echo esc_attr( ghostpool_option( 'search_meta', 'site_rating' ) ); ?>" data-metauserrating="<?php echo esc_attr( ghostpool_option( 'search_meta', 'user_rating' ) ); ?>" data-readmorelink="<?php echo esc_attr( ghostpool_option( 'search_read_more_link' ) ); ?>" data-pagination="<?php echo esc_attr( ghostpool_option( 'search_pagination' ) ); ?>">
  74.  
  75. <div id="gp-new-search">
  76. <?php get_search_form(); ?>
  77. <?php ghostpool_template_filter(
  78. ghostpool_option( 'search_templates' ),
  79. ghostpool_option( 'search_filters_templates' ),
  80. ghostpool_option( 'search_pagination' )
  81. ); ?>
  82. </div>
  83.  
  84. <?php ghostpool_filter(
  85. ghostpool_option( 'search_filters' ),
  86. '',
  87. ghostpool_option( 'search_orderby' ),
  88. ghostpool_option( 'search_pagination' )
  89. ); ?>
  90.  
  91. <div class="gp-section-loop <?php echo sanitize_html_class( ghostpool_option( 'ajax' ) ); ?>">
  92.  
  93. <?php if ( have_posts() ) : ?>
  94.  
  95. <?php global $wp_query; echo ghostpool_search_results_total( $wp_query->found_posts ); ?>
  96.  
  97. <div class="gp-section-loop-inner">
  98. <?php if ( $format == 'gp-blog-masonry' ) { ?><div class="gp-gutter-size"></div><?php } ?>
  99. <?php while ( have_posts() ) : the_post(); ?>
  100. <?php if ( function_exists( 'ghostpool_post_loop' ) ) { ghostpool_post_loop( $format, $image_size_standard, $image_size_hub, $image_size_review, $image_size_preview, $content_display, $excerpt_length, $meta_release_date, $meta_author, $meta_date, $meta_comment_count, $meta_views, $meta_likes, $meta_followers, $meta_cats, $meta_tags, $meta_hub_fields, $meta_site_rating, $meta_user_rating, $read_more_link ); } ?>
  101. <?php endwhile; ?>
  102. </div>
  103.  
  104. <?php echo ghostpool_pagination( $wp_query->max_num_pages, ghostpool_option( 'search_pagination' ) ); ?>
  105.  
  106. <?php else : ?>
  107.  
  108. <strong class="gp-no-items-found"><?php esc_html_e( 'No items found.', 'huber' ); ?></strong>
  109.  
  110. <?php endif; ?>
  111.  
  112. </div>
  113.  
  114. </div>
  115.  
  116. <?php } else { ?>
  117.  
  118. <p><?php esc_html_e( 'You left the search box empty, please enter a valid term.', 'huber' ); ?></p>
  119.  
  120. <?php } ?>
  121.  
  122. </div>
  123.  
  124. <?php get_sidebar( 'left' ); ?>
  125.  
  126. </div>
  127.  
  128. <?php get_sidebar( 'right' ); ?>
  129.  
  130. </div>
  131.  
  132. <?php do_action( 'ghostpool_end_content_wrapper' ); ?>
  133.  
  134. <div class="gp-clear"></div>
  135.  
  136. </div>
  137.  
  138. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement