-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.php
79 lines (66 loc) · 1.89 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* Mission trip archive.
*
* @package Dkjensen\JesusFilmProject
* @link https://dkjensen.com
* @author David Jensen
* @copyright Copyright © 2021 David Jensen
* @license GPL-3.0
*/
namespace Dkjensen\JesusFilmProject;
\remove_all_actions( 'genesis_after_content' );
\remove_all_actions( 'genesis_after_content_sidebar_wrap' );
// Remove default loop.
\remove_action( 'genesis_loop', __NAMESPACE__ . '\Structure\do_loop' );
\add_action( 'genesis_loop', __NAMESPACE__ . '\do_404' );
/**
* This function outputs a 404 "Not Found" error message.
*
* @since 1.6
*/
function do_404() {
\genesis_markup(
array(
'open' => '<article class="entry">',
'context' => 'entry-404',
)
);
\genesis_markup(
array(
'open' => '<h1 %s>',
'close' => '</h1>',
'content' => \apply_filters( 'genesis_404_entry_title', __( 'Not found, error 404', 'jesus-film-project' ) ),
'context' => 'entry-title',
)
);
$genesis_404_content = sprintf(
/* translators: %s: URL for current website. */
__( 'The page you are looking for no longer exists. Perhaps you can return back to the <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'jesus-film-project' ),
\esc_url( \trailingslashit( \home_url() ) )
);
$genesis_404_content = sprintf( '<p>%s</p>', $genesis_404_content );
/**
* The 404 content (wrapped in paragraph tags).
*
* @since 2.2.0
*
* @param string $genesis_404_content The content.
*/
$genesis_404_content = \apply_filters( 'genesis_404_entry_content', $genesis_404_content );
\genesis_markup(
array(
'open' => '<div %s>',
'close' => '</div>',
'content' => $genesis_404_content . \get_search_form( 0 ),
'context' => 'entry-content',
)
);
\genesis_markup(
array(
'close' => '</article>',
'context' => 'entry-404',
)
);
}
\genesis();