forked from RetinaInc/magaz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.php
59 lines (42 loc) · 1.33 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
<?php
/**
* The template for displaying 404 pages (not found).
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package Magaz
*/
get_header(); ?>
<div class='wrapper'>
<div class='CoverImage header-cover FlexEmbed FlexEmbed--3by1'></div>
<div class='row'>
<div class='column column--center medium-12 large-10'>
<?php get_template_part( 'template-parts/page-header', '404' ); ?>
</div>
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 6,
'ignore_sticky_posts' => 1
);
$query = new WP_Query( $args );
?>
<?php if ( $query->have_posts() ) : ?>
<div class='column column--center medium-12 large-10'>
<h5 class='separator'>
<span class='separator__title'><?php esc_html_e( 'Recent Posts', 'magaz' ); ?></span>
</h5>
<div class='row'>
<div class='post-list'>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php get_template_part( 'template-parts/post-card' ); ?>
<?php endwhile; wp_reset_postdata(); ?>
</div><!-- post-list -->
</div><!-- row -->
</div><!-- column -->
<?php endif; ?>
</div><!-- row -->
</div><!-- wrapper -->
<?php
get_footer();