-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
121 lines (83 loc) · 3.95 KB
/
single.php
File metadata and controls
121 lines (83 loc) · 3.95 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="clearfix">
<div id="main" class="twelvecol first clearfix" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<div class="blog__intro">
<img class="wp-post-image" src="<?php the_field('main_image')?>" />
<div class="blogCover">
<div class="l-single-column">
<header class="blogCover__header box--theme6 island clearfix">
<h1 class="single-title"><?php the_title(); ?></h1>
<p><?php the_excerpt(); ?></p>
<p class="byline vcard">Published <time class="updated" datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time('F jS, Y'); ?></time> by <?php the_author(); ?></p>
<div class="blog__scrollTo text-center">
<a id="scroll-link" href="#"><span class="icon-arrow-down"></span></a>
</div>
</header>
</div>
</div>
</div>
<section id="articleBody" class="entry-content l-single-column island clearfix" itemprop="articleBody">
<?php the_content(); ?>
</section> <!-- end article section -->
<footer class="article-footer twelvecol">
<?php
$this_post = $post->ID;
//Return Posts for Blog
$args=array(
'cat' =>1,
'posts_per_page' => 1,
'post_status' => 'publish',
'post__not_in' => array($this_post),
'order' => 'ASC',
'caller_get_posts'=> 1
);
// the query
$the_query = new WP_Query( $args ); ?>
<?php if ( $the_query->have_posts() ) : ?>
<!-- the loop -->
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('twelvecol clearfix'); ?> role="article" data-id="<?php the_ID(); ?>">
<div class="blog__intro">
<img class="wp-post-image" src="<?php the_field('main_image')?>" />
<div class="blogCover">
<div class="l-single-column">
<header class="blogCover__header box--theme6 island clearfix">
<p class="h5"><?php echo('Next Article...');?></p>
<h2 class="single-title"><a class="header-link" href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p><?php the_excerpt(); ?></p>
<p><a class="button" href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">Read More ></a></p>
</header>
</div>
</div>
</div>
</article> <!-- end article -->
<?php endwhile; ?>
<!-- end of the loop -->
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</footer> <!-- end article footer -->
</article> <!-- end article -->
<?php endwhile; ?>
<?php else : ?>
<article id="post-not-found" class="hentry clearfix">
<header class="article-header">
<h1><?php _e("Oops, Post Not Found!", "bonestheme"); ?></h1>
</header>
<section class="entry-content">
<p><?php _e("Uh Oh. Something is missing. Try double checking things.", "bonestheme"); ?></p>
</section>
<footer class="article-footer">
<p><?php _e("This is the error message in the single.php template.", "bonestheme"); ?></p>
</footer>
</article>
<?php endif; ?>
</div> <!-- end #main -->
<?php //get_sidebar(); ?>
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>