-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsingle.php
executable file
·47 lines (37 loc) · 1.05 KB
/
single.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
<?php
/**
* The Template for displaying all single posts....
*
* @package AgriFlex
* @since AgriFlex 1.0
*/
// Include header
get_header();
// Initialize main content area
echo '<div id="wrap">';
echo '<div id="content" role="main">';
// Execute functions hooked to 'agriflex_before_loop'
do_action('agriflex_before_loop');
// Check if there are posts
if ( have_posts() ) {
// Loop through the posts
while ( have_posts() ) {
the_post();
// Load single post content template
get_template_part('content', 'single');
// Output navigation below the content
do_action('agriflex_content_nav', 'nav-below');
// Load the comments template
if ( comments_open() || get_comments_number() ) {
comments_template('', true);
}
}
}
// Execute functions hooked to 'agriflex_after_loop'
do_action('agriflex_after_loop');
// Close main content area
echo '</div><!-- #content -->';
echo '</div><!-- #wrap -->';
// Include sidebar and footer
get_sidebar();
get_footer();