content-none.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Template part for displaying a message that posts cannot be found.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Scratchpad
  8. */
  9. ?>
  10. <section class="no-results not-found">
  11. <header class="page-header">
  12. <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'scratchpad' ); ?></h1>
  13. </header><!-- .page-header -->
  14. <div class="page-content">
  15. <?php
  16. if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
  17. <p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'scratchpad' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
  18. <?php elseif ( is_search() ) : ?>
  19. <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'scratchpad' ); ?></p>
  20. <?php
  21. get_search_form();
  22. else : ?>
  23. <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'scratchpad' ); ?></p>
  24. <?php
  25. get_search_form();
  26. endif; ?>
  27. </div><!-- .page-content -->
  28. </section><!-- .no-results -->