-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfront-page.php
More file actions
108 lines (89 loc) · 4.8 KB
/
front-page.php
File metadata and controls
108 lines (89 loc) · 4.8 KB
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
98
99
100
101
102
103
104
105
106
107
108
<?php get_header(); ?>
<div id="primary">
<div id="content" class="it_container clearfix">
<?php include('outages.php'); ?>
<div class="row">
<div id="home_main" class="col-sm-9" <?php custom_main_image();?>>
<?php while ( have_posts() ) : the_post(); ?>
<span id="arrow-mark" <?php the_blogroll_banner_style(); ?> ></span>
<?php uw_breadcrumbs(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header hidden-lg hidden-md hidden-sm">
<h1 class="entry-title"><?php apply_filters('italics', get_the_title()); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content hidden-xs">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
<div class="hide">
<p class="date"><?php the_date(); ?></p>
<p><?php comments_template( '', true ); ?></p>
</div>
<?php endwhile; // end of the loop.
$cat_id = get_cat_ID('HuskyBytes');
$categories = get_categories('exclude=' . $cat_id);
$cat_ids = array();
foreach($categories as $category) {
$cat_ids[] = $category->cat_ID;
}
$args = array(
'numberposts' => 12,
'posts_per_page' => 12,
'order' => 'DESC',
'orderby' => 'post_date',
'category__in' => $cat_ids
);
$query = new WP_Query( $args );
$postslist = $query->posts;
?>
<div id="main_content" role="main">
<div id="home_spotlight" class="hidden-xs">
<?php
$counter = 0;
$divcount = 0;
$remaining = count($postslist);
foreach ($postslist as $post):
if ($counter == 0):
$divcount++;?>
<div class='spotlight' id='number<? echo $divcount; ?>'><?php endif;
$counter++;
setup_postdata($post); ?>
<div class='spotlight_post'>
<h5 class='home_date'><?php echo get_the_date(); ?></h5>
<p class='post_title'><a href=<?php echo get_permalink(); ?>><?php the_title();?></a></p>
</div>
<?php $last_item = !(--$remaining);
if (($counter == 3) || ($last_item)): $counter = 0;?></div><?php endif;
endforeach; ?>
<?php if ($divcount > 1): ?>
<ul id='spotlight_paginator'>
<?php for ($looper = 1; $looper <= $divcount; $looper++): ?>
<li target='number<?php echo $looper; ?>'><div><div></div></div></li>
<?php endfor; ?>
</ul>
<?php endif ?>
</div>
</div>
</div>
<div id="home_secondary" class="col-sm-3" role="complementary">
<div class="stripe-top"></div><div class="stripe-bottom"></div>
<div class="home_sidebar" id="sidebar" role="navigation" aria-label="Sidebar Menu">
<?php if (is_active_sidebar('homepage-sidebar') && is_front_page()) : dynamic_sidebar('homepage-sidebar'); else: dynamic_sidebar('sidebar'); endif; ?>
</div>
</div>
<div id="home_tertiary" class="col-sm-9 visible-xs" style="background-color:#fff;">
<h2>News</h2>
<?php foreach ($postslist as $post) : setup_postdata($post); ?>
<div class="media">
<h5 class="home_date"><?php echo get_the_date(); ?></h5>
<h3><a href=<?php echo get_permalink(); ?>><?php the_title();?></a></h3>
</div>
<?php endforeach; ?>
</div>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>