search.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php get_header(); ?>
  2. <div id="content">
  3. <div id="inner-content" class="wrap clearfix">
  4. <div id="main" class="eightcol first clearfix" role="main">
  5. <h1 class="archive-title"><span><?php _e('Search Results for:', 'bonestheme'); ?></span> <?php echo esc_attr(get_search_query()); ?></h1>
  6. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  7. <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
  8. <header class="article-header">
  9. <h3 class="search-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
  10. <p class="byline vcard"><?php
  11. printf(__('Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme'), get_the_time('Y-m-j'), get_the_time(__('F jS, Y', 'bonestheme')), bones_get_the_author_posts_link(), get_the_category_list(', '));
  12. ?></p>
  13. </header> <!-- end article header -->
  14. <section class="entry-content">
  15. <?php the_excerpt('<span class="read-more">' . __('Read more &raquo;', 'bonestheme') . '</span>'); ?>
  16. </section> <!-- end article section -->
  17. <footer class="article-footer">
  18. </footer> <!-- end article footer -->
  19. </article> <!-- end article -->
  20. <?php endwhile; ?>
  21. <?php if (function_exists('bones_page_navi')) { ?>
  22. <?php bones_page_navi(); ?>
  23. <?php } else { ?>
  24. <nav class="wp-prev-next">
  25. <ul class="clearfix">
  26. <li class="prev-link"><?php next_posts_link(_e('&laquo; Older Entries', "bonestheme")) ?></li>
  27. <li class="next-link"><?php previous_posts_link(_e('Newer Entries &raquo;', "bonestheme")) ?></li>
  28. </ul>
  29. </nav>
  30. <?php } ?>
  31. <?php else : ?>
  32. <article id="post-not-found" class="hentry clearfix">
  33. <header class="article-header">
  34. <h1><?php _e("Sorry, No Results.", "bonestheme"); ?></h1>
  35. </header>
  36. <section class="entry-content">
  37. <p><?php _e("Try your search again.", "bonestheme"); ?></p>
  38. </section>
  39. <footer class="article-footer">
  40. <p><?php _e("This is the error message in the search.php template.", "bonestheme"); ?></p>
  41. </footer>
  42. </article>
  43. <?php endif; ?>
  44. </div> <!-- end #main -->
  45. <?php get_sidebar(); ?>
  46. </div> <!-- end #inner-content -->
  47. </div> <!-- end #content -->
  48. <?php get_footer(); ?>