-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpage-parent.php
84 lines (77 loc) · 2.38 KB
/
page-parent.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/*
* Template Name: Child index page
*/
get_header(); ?>
<!-- [ #container ] -->
<div id="container" class="innerBox">
<!-- [ #content ] -->
<div id="content" class="content">
<?php if ( have_posts()) : the_post(); ?>
<?php
$content = NULL;
$content = get_the_content();
if ($content) { ?>
<div id="post-<?php the_ID(); ?>" class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . 'Pages:', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php } ?>
<?php if ( is_user_logged_in() == TRUE ) { ?>
<div class="adminEdit">
<span class="linkBtn linkBtnS linkBtnAdmin"><?php edit_post_link(__('Edit', 'biz-vektor')); ?></span>
</div>
<?php } ?>
<?php endif; ?>
<?php
$parentId = get_the_ID();
$args = 'posts_per_page=-1&post_type=page&orderby=menu_order&order=asc&post_parent='.$parentId;
query_posts($args);
if (have_posts()) :
$count = 1;
while (have_posts()) :
the_post();
if ( ( $count % 2 ) > 0 ) {
$layout = 'odd';
} else {
$layout = 'even';
} ?>
<!-- .child_page_block -->
<div class="child_page_block layout_<?php echo $layout ?>">
<div class="child_page_blockInner">
<h4 class="entryTitle"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php if ( has_post_thumbnail()) { ?>
<div class="thumbImage">
<div class="thumbImageInner">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
</div>
</div><!-- [ /.thumbImage ] -->
<?php } ?>
<div class="childText">
<p><a href="<?php the_permalink(); ?>"><?php the_excerpt(); ?></a></p>
<div class="moreLink"><a href="<?php the_permalink(); ?>"><?php echo _x( 'Read more', 'Link to page', 'biz-vektor' ); ?></a></div>
</div>
<?php edit_post_link(__('Edit', 'biz-vektor'),'<span class="linkBtn linkBtnS linkBtnAdmin adminEdit">','</span>'); ?>
</div>
</div>
<!-- /.child_page_block -->
<?php
$count++;
endwhile;
endif;
wp_reset_query();
?>
<?php do_action('biz_vektor_snsBtns'); ?>
<?php do_action('biz_vektor_fbComments'); ?>
<?php do_action('biz_vektor_fbLikeBoxDisplay'); ?>
</div>
<!-- [ /#content ] -->
<!-- [ #sideTower ] -->
<div id="sideTower" class="sideTower">
<?php get_sidebar('page'); ?>
</div>
<!-- [ /#sideTower ] -->
<?php biz_vektor_sideTower_after();?>
</div>
<!-- [ /#container ] -->
<?php get_footer(); ?>