-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKategorisida.php
75 lines (71 loc) · 1.43 KB
/
Kategorisida.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
<?php
/**
* NOT_A_Template Name _:_ parent page
*/
get_header();
?>
<main>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
//
// Post Content here
?>
<article>
<h1 class="heading"><?php the_title(); ?></h1>
<?php
if ( is_home() ) {
//echo ' blog page';
?><div class="exerpt">
<?php the_excerpt();?>
</div>
<?php
if(has_post_thumbnail()){
the_post_thumbnail('wallsize');
//echo "string";
}
else{
echo("<div>image</div>");
}
} else {
//normal page
?><div class="exerpt">
<?php the_content();?>
</div><?php
}
?>
<?php
$args = array(
'post_type' => 'page',
'posts_per_page' => -1,
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order'
);
?>
<ul id="child-pages">
<?php
$parent = new WP_Query( $args );
if ( $parent->have_posts() ) : ?>
<?php while ( $parent->have_posts() ) : $parent->the_post(); ?>
<li>
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
<p><?php the_excerpt(); ?></p>
</li>
<?php endwhile; ?>
<?php endif; wp_reset_postdata(); ?>
</ul>
<footer>
Senast uppdaterad: <?php the_modified_time("j F Y") ?>
</footer>
</article>
<?php
} // end while
} // end if
get_template_part( 'sidebar', 'page' );
?>
</main>
<?php
get_footer();
?>