content-none.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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 Affinity
  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', 'affinity' ); ?></h1>
  13. </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>.', 'affinity' ), 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.', 'affinity' ); ?></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.', 'affinity' ); ?></p>
  24. <?php
  25. get_search_form();
  26. endif; ?>
  27. </div>
  28. </section><!-- .no-results -->