search.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php get_header(); ?>
  2. <div id="content">
  3. <div id="inner-content" class="wrap cf">
  4. <div id="main" class="m-all t-2of3 d-5of7 cf" 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('cf'); ?> 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">
  11. <?php printf( __( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span>', 'bonestheme' ), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), get_the_author_link( get_the_author_meta( 'ID' ) )); ?>
  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. <?php printf( __( 'Filed under: %1$s', 'bonestheme' ), get_the_category_list(', ') ); ?>
  19. <?php the_tags( '<p class="tags"><span class="tags-title">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '</p>' ); ?>
  20. </footer> <!-- end article footer -->
  21. </article> <!-- end article -->
  22. <?php endwhile; ?>
  23. <?php bones_page_navi(); ?>
  24. <?php else : ?>
  25. <article id="post-not-found" class="hentry cf">
  26. <header class="article-header">
  27. <h1><?php _e( 'Sorry, No Results.', 'bonestheme' ); ?></h1>
  28. </header>
  29. <section class="entry-content">
  30. <p><?php _e( 'Try your search again.', 'bonestheme' ); ?></p>
  31. </section>
  32. <footer class="article-footer">
  33. <p><?php _e( 'This is the error message in the search.php template.', 'bonestheme' ); ?></p>
  34. </footer>
  35. </article>
  36. <?php endif; ?>
  37. </div> <!-- end #main -->
  38. <?php get_sidebar(); ?>
  39. </div> <!-- end #inner-content -->
  40. </div> <!-- end #content -->
  41. <?php get_footer(); ?>