Bez popisu

content-none.php 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 Twenty_Twenty_One
  9. * @since Twenty Twenty-One 1.0
  10. */
  11. ?>
  12. <section class="no-results not-found">
  13. <header class="page-header alignwide">
  14. <?php if ( is_search() ) : ?>
  15. <h1 class="page-title">
  16. <?php
  17. printf(
  18. /* translators: %s: Search term. */
  19. esc_html__( 'Results for "%s"', 'twentytwentyone' ),
  20. '<span class="page-description search-term">' . esc_html( get_search_query() ) . '</span>'
  21. );
  22. ?>
  23. </h1>
  24. <?php else : ?>
  25. <h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1>
  26. <?php endif; ?>
  27. </header><!-- .page-header -->
  28. <div class="page-content default-max-width">
  29. <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
  30. <?php
  31. printf(
  32. '<p>' . wp_kses(
  33. /* translators: %s: Link to WP admin new post page. */
  34. __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwentyone' ),
  35. array(
  36. 'a' => array(
  37. 'href' => array(),
  38. ),
  39. )
  40. ) . '</p>',
  41. esc_url( admin_url( 'post-new.php' ) )
  42. );
  43. ?>
  44. <?php elseif ( is_search() ) : ?>
  45. <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentytwentyone' ); ?></p>
  46. <?php get_search_form(); ?>
  47. <?php else : ?>
  48. <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentytwentyone' ); ?></p>
  49. <?php get_search_form(); ?>
  50. <?php endif; ?>
  51. </div><!-- .page-content -->
  52. </section><!-- .no-results -->