Advertisement
Guest User

Dante - search.php

a guest
May 6th, 2015
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.15 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4.  
  5.     $options = get_option('sf_dante_options');
  6.     $default_page_heading_bg_alt = $options['default_page_heading_bg_alt'];
  7.     $sidebar_config = $options['archive_sidebar_config'];
  8.     $left_sidebar = $options['archive_sidebar_left'];
  9.     $right_sidebar = $options['archive_sidebar_right'];
  10.     $blog_type = $options['archive_display_type'];
  11.  
  12.     $page_wrap_class = '';
  13.     if ($sidebar_config == "left-sidebar") {
  14.     $page_wrap_class = 'has-left-sidebar has-one-sidebar row';
  15.     } else if ($sidebar_config == "right-sidebar") {
  16.     $page_wrap_class = 'has-right-sidebar has-one-sidebar row';
  17.     } else if ($sidebar_config == "both-sidebars") {
  18.     $page_wrap_class = 'has-both-sidebars';
  19.     } else {
  20.     $page_wrap_class = 'has-no-sidebar';
  21.     }
  22.  
  23.     sf_set_sidebar_global($sidebar_config);
  24.  
  25. ?>
  26. <div class="container">
  27.     <div class="row">
  28.         <div class="page-heading col-sm-12 clearfix alt-bg <?php echo $default_page_heading_bg_alt; ?>">
  29.             <div class="heading-text">
  30.             <!--<?php $allsearch = new WP_Query("s=$s&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; _e('', "swiftframework"); wp_reset_query(); ?>
  31.             <?php if ($count == 1) : ?>-->
  32.                 <?php printf(__('<h1>%1$s result for <span>%2$s</span></h1>', 'swiftframework'), $count, $key ); ?>
  33.             <?php else : ?>
  34.                 <?php printf(__('<h1>%1$s results for <span>%2$s</span></h1>', 'swiftframework'), $count, $key ); ?>
  35.             <?php endif; ?>
  36.             </div>
  37.             <?php
  38.                 // BREADCRUMBS
  39.                 echo sf_breadcrumbs();
  40.             ?>
  41.         </div>
  42.     </div>
  43. </div>
  44.  
  45. <div class="container">
  46.  
  47.     <div class="inner-page-wrap <?php echo $page_wrap_class; ?> clearfix">
  48.  
  49.         <!-- OPEN page -->
  50.         <?php if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") { ?>
  51.         <div class="archive-page col-sm-8 clearfix">
  52.         <?php } else if ($sidebar_config == "both-sidebars") { ?>
  53.         <div class="archive-page col-sm-9 clearfix">
  54.         <?php } else { ?>
  55.         <div class="archive-page clearfix">
  56.         <?php } ?>
  57.  
  58.             <?php if ($sidebar_config == "both-sidebars") { ?>
  59.             <div class="row">
  60.                 <div class="page-content col-sm-8 clearfix">
  61.  
  62.                     <?php if(have_posts()) : ?>
  63.  
  64.                         <div class="blog-wrap">
  65.  
  66.                             <!-- OPEN .blog-items -->
  67.                             <ul class="blog-items row search-items clearfix">
  68.  
  69.                             <?php while (have_posts()) : the_post(); ?>
  70.  
  71.                                 <li <?php post_class('blog-item col-sm-12'); ?>>
  72.                                     <?php echo sf_get_search_item($post->ID); ?>
  73.                                 </li>
  74.  
  75.                             <?php endwhile; ?>
  76.  
  77.                             <!-- CLOSE .blog-items -->
  78.                             </ul>
  79.  
  80.                         </div>
  81.  
  82.                     <?php else: ?>
  83.  
  84.                     <h3><?php _e("Sorry, there are no posts to display.", "swiftframework"); ?></h3>
  85.  
  86.                     <div class="no-results-text">
  87.                         <p><?php _e("Please use the form below to search again.", "swiftframework"); ?></p>
  88.                         <form method="get" class="search-form" action="<?php echo home_url(); ?>/">
  89.                             <input type="text" placeholder="<?php _e("Search", "swiftframework"); ?>" name="s" />
  90.                         </form>
  91.                         <p><?php _e("Alternatively, you can browse the sitemap below.", "swiftframework"); ?></p>
  92.                         <?php echo do_shortcode('[sf_sitemap]'); ?>
  93.                     </div>
  94.  
  95.                     <?php endif; ?>
  96.  
  97.                     <div class="pagination-wrap">
  98.                         <?php echo pagenavi($wp_query); ?>
  99.                     </div>
  100.  
  101.                 </div>
  102.  
  103.                 <aside class="sidebar left-sidebar col-sm-4">
  104.                     <?php dynamic_sidebar($left_sidebar); ?>
  105.                 </aside>
  106.             </div>
  107.             <?php } else { ?>
  108.  
  109.             <div class="page-content clearfix">
  110.  
  111.                 <?php if(have_posts()) : ?>
  112.  
  113.                     <div class="blog-wrap">
  114.  
  115.                         <!-- OPEN .blog-items -->
  116.                         <ul class="blog-items row search-items clearfix">
  117.  
  118.                         <?php while (have_posts()) : the_post(); ?>
  119.  
  120.                             <li <?php post_class('blog-item col-sm-12'); ?>>
  121.                                 <?php echo sf_get_search_item($post->ID); ?>
  122.                             </li>
  123.  
  124.                         <?php endwhile; ?>
  125.  
  126.                         <!-- CLOSE .blog-items -->
  127.                         </ul>
  128.  
  129.                     </div>
  130.  
  131.                 <?php else: ?>
  132.  
  133.                 <h3><?php _e("Sorry, there are no posts to display.", "swiftframework"); ?></h3>
  134.  
  135.                 <div class="no-results-text">
  136.                     <p><?php _e("Please use the form below to search again.", "swiftframework"); ?></p>
  137.                     <form method="get" class="search-form" action="<?php echo home_url(); ?>/">
  138.                         <input type="text" placeholder="<?php _e("Search", "swiftframework"); ?>" name="s" />
  139.                     </form>
  140.                     <p><?php _e("Alternatively, you can browse the sitemap below.", "swiftframework"); ?></p>
  141.                     <?php echo do_shortcode('[sf_sitemap]'); ?>
  142.                 </div>
  143.  
  144.                 <?php endif; ?>
  145.  
  146.                 <div class="pagination-wrap">
  147.                     <?php echo pagenavi($wp_query); ?>
  148.                 </div>
  149.  
  150.             </div>
  151.  
  152.             <?php } ?>
  153.  
  154.         <!-- CLOSE page -->
  155.         </div>
  156.  
  157.         <?php if ($sidebar_config == "left-sidebar") { ?>
  158.  
  159.             <aside class="sidebar left-sidebar col-sm-4">
  160.                 <?php dynamic_sidebar($left_sidebar); ?>
  161.             </aside>
  162.  
  163.         <?php } else if ($sidebar_config == "right-sidebar") { ?>
  164.  
  165.             <aside class="sidebar right-sidebar col-sm-4">
  166.                 <?php dynamic_sidebar($right_sidebar); ?>
  167.             </aside>
  168.  
  169.         <?php } else if ($sidebar_config == "both-sidebars") { ?>
  170.  
  171.  
  172.             <aside class="sidebar right-sidebar col-sm-3">
  173.                 <?php dynamic_sidebar($right_sidebar); ?>
  174.             </aside>
  175.  
  176.         <?php } ?>
  177.  
  178.     </div>
  179.  
  180. </div>
  181.  
  182. <!--// WordPress Hook //-->
  183. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement