forked from striebwj/canuck-cp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.php
62 lines (60 loc) · 2.45 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
<?php
/**
* Error 404 Page template file
*
* This file is the Error 404 Page template file, which is output whenever
* the server encounters a "404 - file not found" error.
*
* @package Canuck CP ClassicPress Theme
* @copyright Copyright (C) 2020 or later Kevin Archibald
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @author Kevin Archibald <https://kevinsspace.ca/contact/>
*/
global $canuckcp_include_breadcrumbs,$canuckcp_exclude_page_title,$canuckcp_page_title;
$canuckcp_layout_option = get_theme_mod( 'canuckcp_404_layout', 'right_sidebar' );
$canuckcp_include_breadcrumbs = get_theme_mod( 'canuckcp_breadcrumbs' ) ? true : false;
$canuckcp_exclude_page_title = get_theme_mod( 'canuckcp_404_title' ) ? true : false;
$canuckcp_page_title = esc_html__( '404 Error - Page Not Found', 'canuck-cp' );
get_header();
get_template_part( '/template-parts/partials', 'page-title-no-post' );
?>
<div id="main-section">
<div id="content-wrap">
<?php
if ( 'left_sidebar' === $canuckcp_layout_option ) {
echo '<aside id="two-column-sidebar-left" class="toggle-sb-a">';
get_template_part( '/template-parts/sidebars/sidebar', 'error-404-a' );
echo '</aside>';
echo '<div id="two-column-content">';
get_template_part( '/template-parts/partials', '404-content' );
echo '</div>';
} elseif ( 'both_sidebars' === $canuckcp_layout_option ) {
echo '<aside id="three-column-sidebar-left" class="toggle-sb-a">';
get_template_part( '/template-parts/sidebars/sidebar', 'error-404-a' );
echo '</aside>';
echo '<div id="three-column-content">';
get_template_part( '/template-parts/partials', '404-content' );
echo '</div>';
echo '<aside id="three-column-sidebar-right" class="toggle-sb-b">';
get_template_part( '/template-parts/sidebars/sidebar', 'error-404-b' );
echo '</aside>';
} elseif ( 'fullwidth' === $canuckcp_layout_option ) {
echo '<div id="fullwidth">';
get_template_part( '/template-parts/partials', '404-content' );
get_search_form();
get_template_part( '/template-parts/partials', 'recent-posts' );
echo '</div>';
} else {
echo '<div id="two-column-content">';
get_template_part( '/template-parts/partials', '404-content' );
echo '</div>';
echo '<aside id="two-column-sidebar-right" class="toggle-sb-b">';
get_template_part( '/template-parts/sidebars/sidebar', 'error-404-a' );
echo '</aside>';
}
?>
</div>
</div>
<div class="clearfix"></div>
<?php
get_footer();