-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
97 lines (89 loc) · 3.25 KB
/
front-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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
require_once('lib/home_side_menu_nav_walker.php');
get_header();
?>
<div class="container">
<div class="row">
<?php
if ( 'posts' == get_option( 'show_on_front' ) ) :
?>
<!-- News -->
<div id="NewsColumn" class="span8 home-column">
<h2>The Latest</h2>
<!-- the list -->
<ul class="posts-list posts news">
<?php
# Need to loop through posts with cat=news
query_posts( array ( 'category_name' => 'news', 'posts_per_page' => 10 ) );
while (have_posts()){
the_post();
echo string_format(
'<li>
<article><!-- {id} -->
<header>
<a href="{link}" title="{title}" class="title">{title}</a>
<span class="aux date">{date}</span>
</header>
<div class="span7 excerpt">{excerpt}</div>
</article><div class="clearfix"></div>
</li>',
array(
'id' => get_the_ID(),
'link' => get_permalink(),
'title' => get_the_title(),
'date' => get_the_date('d/m/Y'),
'excerpt' => get_the_excerpt()
)
);
}
wp_reset_query();
?>
</ul>
</div>
<?php else : ?>
<!-- Static front page -->
<div id="FrontPageColumn" class="span8 home-column">
<?php
while ( have_posts() ){
the_post();
get_template_part( 'content', 'page' );
}
?>
</div>
<?php endif; ?>
<div id="RHSColumn" class="span4 home-column">
<?php
if ( is_active_sidebar('home_right_1') )
{
echo('<!-- Sidebar1 -->');
echo('<div>');
dynamic_sidebar( 'home_right_1' );
echo('</div>');
}
?>
<!-- Quick Links -->
<div id="LinksColumn">
<h2>Getting Around</h2>
<ul class="links-list">
<?php
wp_nav_menu( array('theme_location' => 'home-side-menu',
'container' => false,
'menu_class' => 'nav nav-list',
'depth' => 2,
'echo' => true) );
?>
</ul>
</div>
<?php
if ( is_active_sidebar('home_right_2') )
{
echo('<!-- Sidebar2 -->');
echo('<div>');
dynamic_sidebar( 'home_right_2' );
echo('</div>');
}
?>
</div>
</div>
</div>
<?php get_footer(); ?>