forked from argoproject/Argo
-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1168 from INN/WE-103-better-404-page
404 page improvements
- Loading branch information
Showing
4 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
<?php | ||
$apologies = __('Apologies, but no results were found. Perhaps searching will help.', 'largo'); | ||
|
||
if ( is_404() ) { | ||
$apologies = sprintf( | ||
__("Apologies, but <code>%s</code> was not found. Perhaps searching will help.", 'largo'), | ||
wp_kses($_SERVER['REQUEST_URI'], array()) // The url, sanitized | ||
); | ||
} else if ( is_search() ) { | ||
$apologies = __("Apologies, but no results were found. Perhaps searching for something else will help.", 'largo'); | ||
} | ||
|
||
?> | ||
<article id="post-0" class="post no-results not-found"> | ||
<header class="entry-header"> | ||
<h1 class="entry-title"><?php _e('Nothing Found', 'largo'); ?></h1> | ||
</header><!-- .entry-header --> | ||
|
||
<div class="entry-content"> | ||
<p><?php _e('Apologies, but no results were found. Perhaps searching will help.', 'largo'); ?></p> | ||
<p><?php echo $apologies; ?></p> | ||
<?php get_search_form(); ?> | ||
</div><!-- .entry-content --> | ||
</article><!-- #post-0 --> | ||
</article><!-- #post-0 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters