content-none.php 1.3 KB

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