Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

search.php

By: a guest on Nov 11th, 2012  |  syntax: HTML  |  size: 1.61 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php get_header(); ?>
  2.  
  3.         <!-- The class "grid_7" restricts the div to 7 columns wide -->
  4.         <div id="content" class="grid_7">
  5.  
  6.         <?php if (have_posts()) : ?>
  7.  
  8.                 <h2 class="pagetitle">Search Results</h2>
  9.  
  10.                 <div class="navigation">
  11.                         <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
  12.                         <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
  13.                 </div><!-- end navigation -->
  14.                
  15.                 <!-- This clears all floats -->
  16.                 <div class="clear">&nbsp;</div>
  17.  
  18.                 <?php while (have_posts()) : the_post(); ?>
  19.  
  20.                         <div <?php post_class() ?>>
  21.                                 <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
  22.                                 <small><?php the_time('l, F jS, Y') ?></small>
  23.  
  24.                                 <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>
  25.                         </div><!-- end post -->
  26.  
  27.                 <?php endwhile; ?>
  28.  
  29.                 <div class="navigation">
  30.                         <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
  31.                         <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
  32.                 </div><!-- end navigation -->
  33.                
  34.                 <!-- This clears all floats -->
  35.                 <div class="clear">&nbsp;</div>
  36.  
  37.         <?php else : ?>
  38.  
  39.                 <h2>No posts found. Try a different search?</h2>
  40.                 <?php get_search_form(); ?>
  41.  
  42.         <?php endif; ?>
  43.  
  44.         </div><!-- end content -->
  45.  
  46. <?php get_sidebar(); ?>
  47.  
  48. <?php get_footer(); ?>