search.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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>
  14. <section class="entry-content">
  15. <?php the_excerpt( '<span class="read-more">' . __( 'Read more &raquo;', 'bonestheme' ) . '</span>' ); ?>
  16. </section>
  17. <footer class="article-footer">
  18. <?php if(get_the_category_list(', ') != ''): ?>
  19. <?php printf( __( 'Filed under: %1$s', 'bonestheme' ), get_the_category_list(', ') ); ?>
  20. <?php endif; ?>
  21. <?php the_tags( '<p class="tags"><span class="tags-title">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '</p>' ); ?>
  22. </footer> <!-- end article footer -->
  23. </article>
  24. <?php endwhile; ?>
  25. <?php bones_page_navi(); ?>
  26. <?php else : ?>
  27. <article id="post-not-found" class="hentry cf">
  28. <header class="article-header">
  29. <h1><?php _e( 'Sorry, No Results.', 'bonestheme' ); ?></h1>
  30. </header>
  31. <section class="entry-content">
  32. <p><?php _e( 'Try your search again.', 'bonestheme' ); ?></p>
  33. </section>
  34. <footer class="article-footer">
  35. <p><?php _e( 'This is the error message in the search.php template.', 'bonestheme' ); ?></p>
  36. </footer>
  37. </article>
  38. <?php endif; ?>
  39. </div>
  40. <?php get_sidebar(); ?>
  41. </div>
  42. </div>
  43. <?php get_footer(); ?>