content-none.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Template part for displaying a message that posts cannot be found
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package Seedlet
  8. * @since 1.0.0
  9. */
  10. ?>
  11. <section class="no-results not-found">
  12. <header class="page-header default-max-width">
  13. <h1 class="page-title"><?php _e( 'Nothing Found', 'seedlet' ); ?></h1>
  14. </header><!-- .page-header -->
  15. <div class="page-content default-max-width">
  16. <?php
  17. if ( is_home() && current_user_can( 'publish_posts' ) ) :
  18. printf(
  19. '<p>' . wp_kses(
  20. /* translators: 1: link to WP admin new post page. */
  21. __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'seedlet' ),
  22. array(
  23. 'a' => array(
  24. 'href' => array(),
  25. ),
  26. )
  27. ) . '</p>',
  28. esc_url( admin_url( 'post-new.php' ) )
  29. );
  30. elseif ( is_search() ) :
  31. ?>
  32. <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'seedlet' ); ?></p>
  33. <?php
  34. get_search_form();
  35. else :
  36. ?>
  37. <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'seedlet' ); ?></p>
  38. <?php
  39. get_search_form();
  40. endif;
  41. ?>
  42. </div><!-- .page-content -->
  43. </section><!-- .no-results -->