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( 'No posts published yet!', '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. ?>
  19. <p>
  20. <?php _e( "Your site is set to show the most recent posts on this page - but you don't have any Posts published.", 'seedlet' ); ?></p>
  21. <p>
  22. <a href="<?php echo esc_url( admin_url( 'edit.php' ) ); ?>" class="button">
  23. <?php
  24. /* translators: 1: link to WP admin new post page. */
  25. _e( 'Add or publish Posts', 'seedlet' );
  26. ?>
  27. </a>
  28. </p>
  29. <?php
  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 -->