content-none.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 Varia
  9. * @since 1.0.0
  10. */
  11. ?>
  12. <section class="no-results not-found">
  13. <header class="page-header responsive-max-width">
  14. <h1 class="page-title"><?php _e( 'No Posts Found', 'varia' ); ?></h1>
  15. </header><!-- .page-header -->
  16. <div class="page-content responsive-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.", 'varia' ); ?></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', 'varia' );
  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.', 'varia' ); ?></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.', 'varia' ); ?></p>
  39. <?php
  40. get_search_form();
  41. endif;
  42. ?>
  43. </div><!-- .page-content -->
  44. </section><!-- .no-results -->