-
Notifications
You must be signed in to change notification settings - Fork 1
/
content-none.php
66 lines (57 loc) · 1.87 KB
/
content-none.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
<?php
/**
* content-none.php
*
* Display the no results for content.
*/
?>
<div class="not-found container-404">
<header class="entry-header">
<h1><?php _e( 'Nothing Found!', 'opal' ) ?></h1>
</header>
<p><?php _e( 'It looks like nothing was found here. Try searching for something else or see the latest posts.', 'opal' ) ?></p>
<div class="search-wrap col-md-6">
<!-- get search form -->
<?php get_search_form(); ?>
</div>
<header class="entry-header">
<h3><?php _e( 'Recent Posts', 'opal' ) ?></h3>
</header>
<div class="recent-posts-wrap row">
<?php
// WP_Query arguments
$query_args = array (
'post_type' => 'post',
'posts_per_page' => 12,
'offset' => 0,
'ignore_sticky_posts' => 1
);
// The Query
$recent_posts = new WP_Query( $query_args );
if($recent_posts->have_posts()) : ?>
<?php while($recent_posts->have_posts()) : $recent_posts->the_post(); ?>
<div class="item-wrap col-md-3 col-sm-4 col-xs-12">
<div class="item">
<?php if( has_post_thumbnail() ) : ?>
<figure class="post-thumb">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('404-thumbs'); ?>
</a>
<?php else : ?>
<figure class="no-post-thumb">
<a href="<?php the_permalink(); ?>">
<span class="no-image-icon fa fa-picture-o"></span>
</a>
<?php endif; ?>
<div class="overlay post-desc">
<h4 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
</div> <!-- .overlay -->
</figure>
</div> <!-- .item -->
</div> <!-- .col-md-3 -->
<?php endwhile; ?>
<?php else: ?>
Sorry ! There are no posts yet.
<?php endif; ?>
</div>
</div> <!-- .not-found -->