-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-template-subpages.php
57 lines (45 loc) · 1.29 KB
/
page-template-subpages.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
<?php
/*
Template Name: Subpages
*/
get_header(); ?>
<div id="content-wrapper">
<div id="page" class="clearfix">
<div id="container">
<div id="content" class="clearfix">
<div id="content-main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(''); ?>>
<?php get_template_part('entry', 'header'); ?>
<div class="entry-content">
<?php the_content( ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'stf' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php get_template_part('entry', 'footer'); ?>
</div><!-- #post-## -->
<div id="subpages-<?php the_ID(); ?>" class="subpages-wrap">
<?php
$args = array(
'post_type' => 'page',
'posts_per_page' => '-1',
'post_parent' => get_the_ID(),
'v_sortby' => 'views',
'v_orderby' => 'desc'
);
query_posts( $args );
include( 'loop-subpages.php' );
wp_reset_query();
?>
</div>
<?php get_template_part('share', 'single'); ?>
<?php stf_comments(); ?>
<?php endwhile; // end of the loop. ?>
</div>
<!-- [End] Main -->
</div>
<!-- [End] Content -->
</div>
<?php get_sidebar() ?>
</div>
</div>
<?php get_footer() ?>