-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-featured.php
70 lines (59 loc) · 1.22 KB
/
template-featured.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
<?php
/*
Template Name: Featured page
*/
get_header();
if(have_posts()){
while(have_posts()){
the_post();
$title=get_the_title();
$cat_id=get_opt('_featured_cat');
$subtitle=get_post_meta($post->ID, 'subtitle_value', true);
$slider=get_post_meta($post->ID, 'slider_value', $single = true);
$slider_prefix=get_post_meta($post->ID, 'slider_name_value', true);
if($slider_prefix=='default'){
$slider_prefix='';
}
$layout=get_post_meta($post->ID, 'layout_value', true);
if($layout==''){
$layout='right';
}
$sidebar=get_post_meta($post->ID, 'sidebar_value', true);
if($sidebar==''){
$sidebar='default';
}
include(TEMPLATEPATH . '/includes/page-header.php');
?>
<div id="content-container" class="content-gradient <?php echo $layoutclass; ?> ">
<div id="<?php echo $content_id; ?>">
<?php
the_content();
}
}
?>
<div class="post-boxes">
<?php
query_posts(array(
'cat' => $cat_id,
'posts_per_page' => -1
));
if(have_posts()){
while(have_posts()){
the_post();
global $more;
$more = 0;
include(TEMPLATEPATH . '/includes/post-template.php');
}
} ?>
</div>
</div>
<?php
if($layout!='full'){
print_sidebar($sidebar);
}
?>
<div class="clear"></div>
</div>
<?php
get_footer();
?>