content-none.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 Pen
  8. */
  9. ?>
  10. <section <?php echo pen_post_classes( array( 'no-results', 'not-found' ) ); /* phpcs:ignore */ ?>>
  11. <header class="page-header<?php echo pen_class_lists( 'header_display_override' ); /* phpcs:ignore */ ?>">
  12. <h1 class="page-title<?php echo pen_class_lists( 'title_display_override' ); /* phpcs:ignore */ ?>">
  13. <?php
  14. esc_html_e( 'Nothing Found', 'pen' );
  15. ?>
  16. </h1>
  17. </header><!-- .page-header -->
  18. <div class="page-content clearfix">
  19. <div class="pen_content_wrapper">
  20. <?php
  21. if ( is_home() && current_user_can( 'publish_posts' ) ) {
  22. ?>
  23. <p>
  24. <?php
  25. printf(
  26. wp_kses(
  27. // Translators: %1$s: Just a URL.
  28. __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'pen' ),
  29. array(
  30. 'a' => array(
  31. 'href' => array(),
  32. ),
  33. )
  34. ),
  35. esc_url( admin_url( 'post-new.php' ) )
  36. );
  37. ?>
  38. </p>
  39. <?php
  40. } elseif ( is_search() ) {
  41. ?>
  42. <p>
  43. <?php
  44. esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'pen' );
  45. ?>
  46. </p>
  47. <?php
  48. } else {
  49. ?>
  50. <p>
  51. <?php
  52. esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'pen' );
  53. ?>
  54. </p>
  55. <?php
  56. }
  57. ?>
  58. </div>
  59. </div><!-- .page-content -->
  60. </section><!-- .no-results -->