Advertisement
Guest User

Untitled

a guest
Sep 12th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.25 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.                    
  43. if(!empty($_GET['s']))
  44. {
  45. echo "<h4 class='extra-mini-title widgettitle'>{$results}</h4>";
  46.  
  47. global $posts;
  48. $post_ids = array();
  49. foreach($posts as $post) $post_ids[] = $post->ID;
  50.  
  51. $atts = array(
  52. 'type' => 'grid',
  53. 'items' => get_option('posts_per_page'),
  54. 'columns' => 4,
  55. 'class' => 'avia-builder-el-no-sibling',
  56. 'paginate' => 'yes',
  57. 'use_main_query_pagination' => 'yes',
  58. 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types() )
  59. );
  60.  
  61. $blog = new avia_post_slider($atts);
  62. $blog->query_entries();
  63. echo "<div class='entry-content'>".$blog->html()."</div>";
  64. }                  
  65.  
  66.  
  67.  
  68.  
  69.                     ?>
  70.  
  71.                 <!--end content-->
  72.                 </main>
  73.  
  74.                 <?php
  75.  
  76.                 //get the sidebar
  77.                 $avia_config['currently_viewing'] = 'page';
  78.  
  79.                 get_sidebar();
  80.  
  81.                 ?>
  82.  
  83.             </div><!--end container-->
  84.  
  85.         </div><!-- close default .container_wrap element -->
  86.  
  87.  
  88.  
  89.  
  90. <?php
  91.         get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement