-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.php
87 lines (75 loc) · 2.38 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
80
81
82
83
84
85
86
87
<?php
/**
* Genesis Framework.
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* @package Genesis\Templates
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis/
*/
// Remove default loop.
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'genesis_404' );
/**
* This function outputs a 404 "Not Found" error message.
*
* @since 1.6
*/
function genesis_404() {
genesis_markup(
[
'open' => '<main class="content" id="genesis-content"><article class="page type-page status-publish entry" itemscope="" itemtype="http://schema.org/CreativeWork"><div class="entry-content" itemprop="text"><div class="wp-block-group inner-fixed padding-bottom-60 is-layout-constrained wp-block-group-is-layout-constrained"><div class="wp-block-group__inner-container">',
'context' => 'entry-404',
]
);
genesis_markup(
[
'open' => '<h1 %s>',
'close' => '</h1>',
'content' => apply_filters( 'genesis_404_entry_title', __( '404', 'genesis' ) ),
'context' => 'entry-title',
]
);
genesis_markup(
[
'open' => '<h2 %s>',
'close' => '</h2>',
'content' => apply_filters( 'genesis_404_entry_title', __( 'Error Page Not Found', 'genesis' ) ),
'context' => 'entry-title',
]
);
$genesis_404_content = sprintf(
/* translators: %s: URL for current website. */
__( 'Sorry we can not find the page you are looking for.<div class="wp-block-buttons blue-button round-button is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="/">Go Back Home</a></div>
</div>', 'genesis' ),
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(
[
'open' => '<div %s>',
'close' => '</div>',
'content' => $genesis_404_content,
'context' => 'entry-content',
]
);
genesis_markup(
[
'close' => '</div></div></div></article></main>',
'context' => 'entry-404',
]
);
}
genesis();