content-none.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * The template part for displaying a message that posts cannot be found.
  4. *
  5. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Dyad
  8. */
  9. ?>
  10. <article class="no-results not-found">
  11. <div class="entry-inner">
  12. <div class="entry-inner-content">
  13. <header class="entry-header">
  14. <h2><?php esc_html_e( 'Nothing Found', 'dyad-2' ); ?></h2>
  15. </header><!-- .entry-header -->
  16. <div class="entry-content">
  17. <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
  18. <p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'dyad-2' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
  19. <?php elseif ( is_search() ) : ?>
  20. <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'dyad-2' ); ?></p>
  21. <?php get_search_form(); ?>
  22. <?php else : ?>
  23. <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'dyad-2' ); ?></p>
  24. <?php get_search_form(); ?>
  25. <?php endif; ?>
  26. </div><!-- .entry-content -->
  27. </div><!-- .entry-inner-content -->
  28. </div><!-- .entry-inner -->
  29. <a class="cover-link" href="<?php the_permalink(); ?>"></a>
  30. </article><!-- .no-results not-found -->