Advertisement
Guest User

test

a guest
Mar 18th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. <?php
  2. if ( !defined('ABSPATH') ){ die(); }
  3.  
  4. global $avia_config;
  5.  
  6.  
  7. /*
  8. * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
  9. */
  10. get_header();
  11.  
  12. // allows to customize the layout
  13. do_action( 'ava_search_after_get_header' );
  14.  
  15.  
  16. $results = avia_which_archive();
  17. echo avia_title(array('title' => $results ));
  18.  
  19. do_action( 'ava_after_main_title' );
  20. ?>
  21.  
  22. <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
  23.  
  24. <div class='container'>
  25.  
  26. <main class='content template-search <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content'));?>>
  27.  
  28. <div class='page-heading-container clearfix'>
  29. <section class="search_form_field">
  30. <?php
  31. echo "<h4>".__('New Search','avia_framework')."</h4>";
  32. echo "<p>".__('If you are not happy with the results below please do another search','avia_framework')."</p>";
  33.  
  34. get_search_form();
  35. echo "<span class='author-extra-border'></span>";
  36. ?>
  37. </section>
  38. </div>
  39.  
  40.  
  41. <?php
  42. if(!empty($_GET['s']) || have_posts())
  43. {
  44. echo "<h4 class='extra-mini-title widgettitle'>{$results}</h4>";
  45.  
  46. /* Run the loop to output the posts.
  47. * If you want to overload this in a child theme then include a file
  48. * called loop-search.php and that will be used instead.
  49. */
  50. $more = 0;
  51. global $posts;
  52. $post_ids = array();
  53. foreach($posts as $post) $post_ids[] = $post->ID;
  54.  
  55. if(!empty($post_ids))
  56. {
  57. $atts = array(
  58. 'type' => 'grid',
  59. 'items' => get_option('posts_per_page'),
  60. 'columns' => 4,
  61. 'class' => 'avia-builder-el-no-sibling',
  62. 'paginate' => 'yes',
  63. 'use_main_query_pagination' => 'yes',
  64. 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types() )
  65. );
  66.  
  67. $blog = new avia_product_slider($atts);
  68. $blog->query_entries();
  69. echo "<div class='entry-content-wrapper'>".$blog->html()."</div>";
  70. } else {
  71. echo "<div class='entry-content-wrapper'>".__('No products found.', 'avia_framework')."</div>";
  72. }
  73. }
  74.  
  75. ?>
  76.  
  77. <!--end content-->
  78. </main>
  79.  
  80. <?php
  81.  
  82. //get the sidebar
  83. $avia_config['currently_viewing'] = 'page';
  84.  
  85. get_sidebar();
  86.  
  87. ?>
  88.  
  89. </div><!--end container-->
  90.  
  91. </div><!-- close default .container_wrap element -->
  92.  
  93.  
  94.  
  95.  
  96. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement