[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentynineteen/template-parts/content/ -> content-none.php (source)

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


Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1