-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
79 lines (66 loc) · 2.53 KB
/
index.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
<?php get_header();?>
<div class="container">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="row" style="padding-top: 20px;">
<div class="hidden-xs col-md-4 col-md-offset-8">
<?php $parent_title = get_the_title($post->post_parent); ?>
<h4 style="text-align: left; text-transform: uppercase;"><?php echo $parent_title; ?></h4>
<hr class="left-divider"/>
</div>
</div>
<div class="row"> <!-- img with sub nav -->
<div class="col-md-8 blog-main">
<?php if(has_post_thumbnail()) : ?>
<div class="head-img"> <?php the_post_thumbnail(); ?></div>
<?php endif; ?>
</div>
<div class="hidden-xs col-md-4 blog-sidebar">
<div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav side-nav">
<?php
if($post->post_parent) { //Die Seite ist "Kind-Seite"
wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->post_parent);
}
elseif(wp_list_pages("child_of=".$post->ID."&echo=0")) { //Die Seite hat "Kinder"
wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->ID);
}
?>
</ul>
</div>
</div>
</div><!-- /.sub nav -->
</div> <!-- row -->
<div class="row">
<div class="col-sm-8">
<h2><?php the_title();?></h2>
<hr class="orange-divider"/>
</div>
</div><!-- row for heading -->
<div class="row">
<div class="col-sm-8 blog-post">
<?php the_content();?>
<?php endwhile; ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</div><!-- /.blog-post -->
<div class="col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-0 blog-sidebar">
<?php
$current = array (get_the_ID());
query_posts(array('orderby' => 'rand', 'showposts' => 1, 'post_type' => 'page', 'category_name' => 'Leistung', 'post__not_in' => $current ));
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div class="grey">
<p> Außerdem bei uns: </p>
<h4 class="uppercase" style="text-align: left;"><?php the_title(); ?></h4>
<hr class="left-divider"/>
<?php the_post_thumbnail(); ?>
<p style="padding: 10px;"><?php my_excerpt('short'); ?></p>
</div>
<?php endwhile;
endif; ?>
</div><!-- /.blog-sidebar -->
</div><!-- row -->
</div><!-- /.container -->
<?php get_footer();?>