Advertisement
Guest User

search.php

a guest
Jan 23rd, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.44 KB | None | 0 0
  1. <?php
  2.  
  3. // Exit if accessed directly
  4. if ( !defined('ABSPATH')) exit;
  5.  
  6. /**
  7. * Search Template
  8. *
  9. *
  10. * @file           search.php
  11. * @package        Responsive
  12. * @author         Emil Uzelac
  13. * @copyright      2003 - 2013 ThemeID
  14. * @license        license.txt
  15. * @version        Release: 1.0
  16. * @filesource     wp-content/themes/responsive/search.php
  17. * @link           http://codex.wordpress.org/Theme_Development#Search_Results_.28search.php.29
  18. * @since          available since Release 1.0
  19. */
  20. ?>
  21. <?php get_header(); ?>
  22.  
  23.         <div id="content-search" class="grid col-620">
  24.  
  25. <?php if (have_posts()) : ?>
  26.  
  27.     <h6><?php printf(__('Search results for: %s', 'responsive' ), '<span>' . get_search_query() . '</span>'); ?></h6>
  28.  
  29.         <?php while (have_posts()) : the_post(); ?>
  30.        
  31.        
  32.             <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  33.                
  34.                 <h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'responsive'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h1>
  35.                
  36.                 <div class="post-meta">
  37.                 <?php responsive_post_meta_data(); ?>
  38.                
  39.                     <?php if ( comments_open() ) : ?>
  40.                         <span class="comments-link">
  41.                         <span class="mdash">&mdash;</span>
  42.                     <?php comments_popup_link(__('No Comments &darr;', 'responsive'), __('1 Comment &darr;', 'responsive'), __('% Comments &darr;', 'responsive')); ?>
  43.                         </span>
  44.                     <?php endif; ?>
  45.                 </div><!-- end of .post-meta -->
  46.                
  47.                 <div class="post-entry">
  48.                     <?php the_excerpt(); ?>
  49.                     <?php wp_link_pages(array('before' => '<div class="pagination">' . __('Pages:', 'responsive'), 'after' => '</div>')); ?>
  50.                 </div><!-- end of .post-entry -->
  51.                            
  52.  
  53.             <div class="post-edit"><?php edit_post_link(__('Edit', 'responsive')); ?></div>              
  54.             </div><!-- end of #post-<?php the_ID(); ?> -->
  55.            
  56.         <?php endwhile; ?>
  57.        
  58.         <?php if (  $wp_query->max_num_pages > 1 ) : ?>
  59.         <div class="navigation">
  60.             <div class="previous"><?php next_posts_link( __( '&#8249; Older posts', 'responsive' ) ); ?></div>
  61.             <div class="next"><?php previous_posts_link( __( 'Newer posts &#8250;', 'responsive' ) ); ?></div>
  62.         </div><!-- end of .navigation -->
  63.         <?php endif; ?>
  64.  
  65.         <?php else : ?>
  66.  
  67.         <h3 class="title-404"><?php printf(__('Your search for %s did not match any entries.', 'responsive' ), get_search_query() ); ?></h3>
  68.                    
  69.         <p><?php _e('Don&#39;t panic, we&#39;ll get through this together. Let&#39;s explore our options here.', 'responsive'); ?></p>
  70.                    
  71.         <h6><?php printf( __('You can return %s or search for the page you were looking for.', 'responsive'),
  72.                 sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
  73.                     esc_url( get_home_url() ),
  74.                     esc_attr__('Home', 'responsive'),
  75.                     esc_attr__('&larr; Home', 'responsive')
  76.                     ));
  77.              ?></h6>
  78.                    
  79.         <?php get_search_form(); ?>
  80.  
  81. <?php endif; ?>  
  82.      
  83.         </div><!-- end of #content-search -->
  84.  
  85. <?php get_sidebar(); ?>
  86. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement