_s: Simplifying search, index, and archive, with a common no posts found template part, no-results.php; Closes #1187
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9340 d957f892-c61d-0410-b221-f235e6eecf30
This commit is contained in:
parent
18df2c463c
commit
43ea44cb44
4 changed files with 37 additions and 29 deletions
34
no-results.php
Normal file
34
no-results.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* The template part for displaying a message that posts cannot be found.
|
||||
*
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package _s
|
||||
* @since _s 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<header class="entry-header">
|
||||
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php if ( is_home() ) { ?>
|
||||
|
||||
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', '_s' ), admin_url( 'post-new.php' ) ); ?></p>
|
||||
|
||||
<?php } elseif ( is_search() ) { ?>
|
||||
|
||||
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '_s' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php } ?>
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-0 -->
|
Loading…
Add table
Add a link
Reference in a new issue