-
Notifications
You must be signed in to change notification settings - Fork 1
/
room.php
38 lines (35 loc) · 1023 Bytes
/
room.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
<?php
/**
* Template Name: Room
*
* A custom page template for the room page
*
*
* @package WordPress
* @subpackage kvarteret
* @since Kvarteret 1.0
*/
get_header(); ?>
<?php
// Add custom excerpt length
function custom_excerpt_length($length) {
return 20;
}
add_filter('excerpt_length', 'custom_excerpt_length');
?>
<?php get_sidebar(); ?>
<div id="content" role="main" class="room_content">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<!-- This loops through all the children of the Rom page. -->
<?php query_posts(array('post_parent' => 11, 'post_type' => 'page', 'post_status' => 'published', 'posts_per_page' => -1)); while (have_posts()) { the_post(); ?>
<div class="room_container">
<h2><?php the_title(); ?></h2>
<?php the_post_thumbnail('room-thumbnail'); ?>
<?php the_content(); ?>
</div>
<?php } ?>
<!-- #content -->
</div>
</div><!-- #content -->
<?php get_footer(); ?>