forked from openknowledge-archive/wordpress-theme-okfn
-
Notifications
You must be signed in to change notification settings - Fork 2
/
home-page.php
74 lines (61 loc) · 1.86 KB
/
home-page.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
<?php
/*
Template Name: Home
*/
/* body class="magazine" */
add_filter('body_class','browser_body_class');
function browser_body_class($classes = '') {
array_push($classes,"magazine home-template");
return $classes;
}
?>
<?php get_header() ?>
<div class="row">
<div id="content" class="span12">
<div class="padder">
<?php do_action( 'bp_before_blog_home' ) ?>
<?php do_action( 'template_notices' ) ?>
<div class="page" id="blog-latest" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<h3 class="blog-latest-heading"><? echo __("From our Blog", "okfn")?></h3>
<div class="posts">
<?php
/* =================== */
/* == Magazine Body == */
/* =================== */
$post_filter_main = array('category_name' => 'Featured', 'posts_per_page' => 1 );
$idsToSkip = array();
// Print the main post
query_posts( $post_filter_main );
if (have_posts()) {
the_post();
//echo_magazine_post($post, true);
// Skip that post's ID in the remining section
//array_push($idsToSkip, $post->ID);
}
// Query remaining posts
$post_filter_etc = array('category_name' => 'Featured', 'posts_per_page' => 4, 'post__not_in' => $idsToSkip);
// Print the remaining posts
query_posts( $post_filter_etc );
while (have_posts()) {
the_post();
echo_magazine_post($post, false);
}
/* =================== */
?>
</div>
</div>
<?php do_action( 'bp_after_blog_home' ) ?>
</div><!-- .padder -->
</div><!-- #content -->
<?php //get_sidebar() ?>
</div>
<?php get_footer() ?>
<script>
jQuery(document).ready(function() {
jQuery(".post.preview .text").dotdotdot({});
jQuery(".post.preview .text h2").dotdotdot({});
});
</script>