-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.php
28 lines (24 loc) · 856 Bytes
/
404.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* 404 Error page.
*
* @package evangelical-magazine-theme
* @author Mark Barnes
* @access public
*/
//* Instead of displaying a standard 404 error page, we're going to display a search page based on strings in the URL
add_action ('genesis_loop', 'genesis_404', 9);
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_filter ('get_search_query', array ('evangelical_mag_theme', 'filter_search_query_on_404'));
/**
* Outputs the 404 page
*
* @return void
*/
function genesis_404() {
echo '<article class="entry"><h1 class="entry-title">Sorry, page not found</h1><div class="entry-content">';
echo '<p>The page you are looking for doesn’t exist. Perhaps you can find what you’re looking for by searching. Enter your query, then click <strong>search</strong>.</p>';
echo get_search_form(false);
echo '</article>';
}
genesis();