content-none.php 1.3 KB

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