content-none.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php declare( strict_types = 1 ); ?>
  2. <?php
  3. /**
  4. * Template part for displaying a message that posts cannot be found
  5. *
  6. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  7. *
  8. * @package 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( 'No posts published yet!', 'seedlet' ); ?></h1>
  15. </header><!-- .page-header -->
  16. <div class="page-content default-max-width">
  17. <?php
  18. if ( is_home() && current_user_can( 'publish_posts' ) ) :
  19. ?>
  20. <p>
  21. <?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>
  22. <p>
  23. <a href="<?php echo esc_url( admin_url( 'edit.php' ) ); ?>" class="button">
  24. <?php
  25. /* translators: 1: link to WP admin new post page. */
  26. _e( 'Add or publish Posts', 'seedlet' );
  27. ?>
  28. </a>
  29. </p>
  30. <?php
  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 -->