1
|
1 |
<?php |
|
2 |
/** |
|
3 |
* Template Name: Front Page |
|
4 |
* |
|
5 |
* Useful for sites that need a news-type front page. |
|
6 |
*/ |
|
7 |
|
|
8 |
get_header(); ?> |
|
9 |
|
|
10 |
<div class="hfeed content"> |
|
11 |
|
|
12 |
<?php hybrid_before_content(); // Before content hook ?> |
|
13 |
|
|
14 |
<div id="slider-container"> |
|
15 |
|
|
16 |
<div id="slider"> |
|
17 |
|
|
18 |
<?php |
|
19 |
if ( $malleable_settings['feature_category'] ) |
|
20 |
$feature_query = array( 'cat' => $malleable_settings['feature_category'], 'showposts' => $malleable_settings['feature_num_posts'], 'caller_get_posts' => 1 ); |
|
21 |
else |
|
22 |
$feature_query = array( 'post__in' => get_option( 'sticky_posts' ), 'showposts' => $malleable_settings['feature_num_posts'] ); |
|
23 |
?> |
|
24 |
|
|
25 |
<?php query_posts( $feature_query ); ?> |
|
26 |
|
|
27 |
<?php while ( have_posts() ) : the_post(); $do_not_duplicate[] = $post->ID; ?> |
|
28 |
|
|
29 |
<div class="<?php hybrid_entry_class( 'feature' ); ?>"> |
|
30 |
|
|
31 |
<?php get_the_image( array( 'custom_key' => array( 'Medium', 'Feature Image' ), 'default_size' => 'medium' ) ); ?> |
|
32 |
|
|
33 |
<?php hybrid_before_entry(); ?> |
|
34 |
|
|
35 |
<div class="entry-summary entry"> |
|
36 |
<?php the_excerpt(); ?> |
|
37 |
</div> |
|
38 |
|
|
39 |
<?php hybrid_after_entry(); ?> |
|
40 |
|
|
41 |
</div> |
|
42 |
|
|
43 |
<?php endwhile; wp_reset_query(); ?> |
|
44 |
|
|
45 |
</div> |
|
46 |
|
|
47 |
</div> |
|
48 |
|
|
49 |
<div id="excerpts"> |
|
50 |
|
|
51 |
<?php query_posts( array( 'cat' => $malleable_settings['excerpt_category'], 'showposts' => $malleable_settings['excerpt_num_posts'], 'caller_get_posts' => 1, 'post__not_in' => $do_not_duplicate ) ); ?> |
|
52 |
|
|
53 |
<?php while( have_posts() ) : the_post(); $do_not_duplicate[] = $post->ID; ?> |
|
54 |
|
|
55 |
<div class="<?php hybrid_entry_class(); ?>"> |
|
56 |
|
|
57 |
<?php hybrid_before_entry(); ?> |
|
58 |
|
|
59 |
<div class="entry-summary entry"> |
|
60 |
<?php get_the_image( array( 'custom_key' => array( 'Thumbnail', 'Feature Image Thumbnail' ), 'default_size' => 'thumbnail', 'height' => '125', 'width' => '125' ) ); ?> |
|
61 |
<?php the_excerpt(); ?> |
|
62 |
</div> |
|
63 |
|
|
64 |
<?php hybrid_after_entry(); ?> |
|
65 |
|
|
66 |
</div> |
|
67 |
|
|
68 |
<?php endwhile; wp_reset_query(); ?> |
|
69 |
|
|
70 |
</div> |
|
71 |
|
|
72 |
<?php if ( !empty( $malleable_settings['headlines_category'] ) ) : $alt = 'odd'; ?> |
|
73 |
|
|
74 |
<div id="headlines"> |
|
75 |
|
|
76 |
<?php foreach ( $malleable_settings['headlines_category'] as $category ) : ?> |
|
77 |
|
|
78 |
<?php $headlines = get_posts( array( |
|
79 |
'numberposts' => $malleable_settings['headlines_num_posts'], |
|
80 |
'category' => $category, |
|
81 |
'post__not_in' => $do_not_duplicate |
|
82 |
) ); ?> |
|
83 |
|
|
84 |
<?php if ( !empty( $headlines ) ) : ?> |
|
85 |
|
|
86 |
<div class="section <?php echo $alt; ?>"> |
|
87 |
|
|
88 |
<?php $cat = get_category( $category ); ?> |
|
89 |
|
|
90 |
<h3 class="section-title"><a href="<?php echo get_category_link( $category ); ?>" title="<?php echo $cat->name; ?>"><?php echo $cat->name; ?></a></h3> |
|
91 |
|
|
92 |
<ul> |
|
93 |
<?php foreach ( $headlines as $post ) : $do_not_duplicate[] = $post->ID; ?> |
|
94 |
<li><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li> |
|
95 |
<?php endforeach; ?> |
|
96 |
</ul> |
|
97 |
|
|
98 |
</div> |
|
99 |
|
|
100 |
<?php if ( $i++ % 2 == 0 ) $alt = 'even'; else $alt = 'odd'; ?> |
|
101 |
|
|
102 |
<?php endif; ?> |
|
103 |
|
|
104 |
<?php endforeach; ?> |
|
105 |
|
|
106 |
</div> |
|
107 |
|
|
108 |
<?php endif; ?> |
|
109 |
|
|
110 |
<?php hybrid_after_page(); // After page hook ?> |
|
111 |
|
|
112 |
<?php hybrid_after_content(); // After content hook ?> |
|
113 |
|
|
114 |
</div> |
|
115 |
|
|
116 |
<?php get_footer(); ?> |