search.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php get_header(); ?>
  2. <div id="content">
  3. <div id="inner-content" class="wrap cf">
  4. <main 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="entry-header article-header">
  9. <h3 class="search-title entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
  10. <p class="byline entry-meta vcard">
  11. <?php printf( __( 'Posted %1$s by %2$s', 'bonestheme' ),
  12. /* the time the post was published */
  13. '<time class="updated entry-time" datetime="' . get_the_time('Y-m-d') . '" itemprop="datePublished">' . get_the_time(get_option('date_format')) . '</time>',
  14. /* the author of the post */
  15. '<span class="by">by</span> <span class="entry-author author" itemprop="author" itemscope itemptype="http://schema.org/Person">' . get_the_author_link( get_the_author_meta( 'ID' ) ) . '</span>'
  16. ); ?>
  17. </p>
  18. </header>
  19. <section class="entry-content">
  20. <?php the_excerpt( '<span class="read-more">' . __( 'Read more &raquo;', 'bonestheme' ) . '</span>' ); ?>
  21. </section>
  22. <footer class="article-footer">
  23. <?php if(get_the_category_list(', ') != ''): ?>
  24. <?php printf( __( 'Filed under: %1$s', 'bonestheme' ), get_the_category_list(', ') ); ?>
  25. <?php endif; ?>
  26. <?php the_tags( '<p class="tags"><span class="tags-title">' . __( 'Tags:', 'bonestheme' ) . '</span> ', ', ', '</p>' ); ?>
  27. </footer> <!-- end article footer -->
  28. </article>
  29. <?php endwhile; ?>
  30. <?php bones_page_navi(); ?>
  31. <?php else : ?>
  32. <article id="post-not-found" class="hentry cf">
  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. </main>
  45. <?php /* get_sidebar(); */ ?>
  46. </div>
  47. </div>
  48. <?php get_footer(); ?>