-
Notifications
You must be signed in to change notification settings - Fork 1
/
404.php
82 lines (62 loc) · 2.06 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
<?php
/**
* The template for displaying 404 pages (not found).
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @since MeisterMag 1.0
*/
get_header(); ?>
<div class="tagdiv-main-content-wrap">
<div class="tagdiv-container">
<div class="tagdiv-span12">
<div class="tagdiv-404-head">
<div class="tagdiv-404-title"><?php esc_html_e( '404', 'meistermag' ); ?></div>
<div class="tagdiv-404-sub-title"><?php esc_html_e( 'Oops!', 'meistermag' ); ?></div>
<div class="tagdiv-404-sub-sub-title"><?php esc_html_e( 'Sorry, but the page you are looking for doesn’t exist. Please use search for help', 'meistermag' ); ?></div>
<div class="tagdiv-search-page-wrap">
<?php get_search_form(); ?>
</div>
</div>
<?php
$args = array(
'post_type'=> 'post',
'showposts' => 3,
'ignore_sticky_posts' => 1
);
$tagdiv_404_query = new WP_Query( $args );
if ( $tagdiv_404_query->have_posts() ) {
$tagdiv_current_column = 1;
$tagdiv_row_is_open = false;
while ( $tagdiv_404_query->have_posts() ) {
$tagdiv_404_query->the_post();
if ( false === $tagdiv_row_is_open ) {
$tagdiv_row_is_open = true;
echo '<div class="tagdiv-row">'; // open a grid row
} ?>
<div class="tagdiv-span4">
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
</div>
<?php if ( 3 == $tagdiv_current_column and true === $tagdiv_row_is_open ) {
$tagdiv_row_is_open = false;
echo '</div>'; // close the grid row
}
if ( 3 == $tagdiv_current_column ) {
$tagdiv_current_column = 1;
} else {
$tagdiv_current_column++;
}
} //end of the loop
if ( true === $tagdiv_row_is_open ) {
$tagdiv_row_is_open = false;
echo '</div>'; // close the grid row
}
wp_reset_postdata();
} else {
get_template_part( 'template-parts/content', 'none' );
}
?>
</div>
</div> <!-- /.tagdiv-container -->
</div> <!-- /.tagdiv-main-content-wrap -->
<?php get_footer(); ?>