Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (112 sloc) 5.6 KB
<?php
/*
Template Name: Home
*/
get_header();
$homepageLayout = get_theme_mod( 'homepagelayout','3-3');
if($homepageLayout == '1-3') {
/*
Template Name: Homepage 1-3
*/
?>
<div id="home">
<div class="row" id="row1">
<div class="home-loading" role="complementary"></div>
<div id="home1" class="" role="complementary">
<?php if ( is_active_sidebar( 'home1' ) ) { ?>
<?php dynamic_sidebar( 'home1' ); ?>
<?php } else { ?>
<h1>Home1</h1>
<p>Go to Appearance > Widgets, and drag items into Home1 to edit this area.</p>
<?php }; ?>
</div>
</div>
<div class="container">
<div class="row" id="row2">
<div id="home2" class="span9" role="complementary">
<h4> News</h4>
</div>
<div class="span3" role="complementary">
<h6><a href="<?php bloginfo('template_url'); ?>/news-archive">More News &raquo;</a></h6>
</div>
</div>
<div class="row" id="row3">
<div id="home3">
<?php $args = array('category_name' => 'news-home',
'posts_per_page' => 3,
'orderby' => 'post-date');
$posts = get_posts($args);
?>
<?php if ( !empty($posts) && isset($posts[0])) : foreach( $posts as $post ) : setup_postdata($post); ?>
<div class="span4 home-news" role="complementary">
<div class="post-thumbnail-home">
<a class="post-link" href="<?php the_permalink() ?>"> <?php the_post_thumbnail('large');?></a>
</div>
<div class="post-date-home">
<?php the_time('F j, Y'); ?>
</div>
<div class="post-title-home">
<a class="post-link" href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</div>
<div class="post-content-home">
<?php the_excerpt(); ?>
</div>
<div class="post-tags-home clear">
<?php
$posttags = get_the_tags();
if ($posttags) {
$include = array('humanities', 'life-behavioral-sciences', 'physical-sciences', 'social-sciences','centers-and-institutes');
foreach($posttags as $tag) {
if(in_array($tag->slug,$include)){
echo '<a href="';echo bloginfo(url);
echo '/news-archive/?division=' . $tag->slug . '" class="' . $tag->slug . '">' . $tag->name . '</a>';
}
}
}
?>
</div>
</div>
<?php endforeach; ?>
<?php else: ?>
<p>
<?php _e('Sorry, no recent news.'); ?>
</p>
<?php endif; ?>
</div>
</div>
</div> <!-- ------- end container -->
<div class="container-fluid row4-wrap">
<div class="container">
<div class="row" id="row4">
<div class="span4">
<?php if ( is_active_sidebar( 'home3-ll' ) ) { ?>
<?php dynamic_sidebar( 'home3-ll' ); ?>
<?php } else { ?>
<h1>Home - 3rd Row - Left</h1>
<p>Go to Appearance > Widgets, and drag items into Home - 3rd Row - Left to edit this area.</p>
<?php }; ?>
</div>
<div class="span4">
<?php if ( is_active_sidebar( 'home3-lc' ) ) { ?>
<?php dynamic_sidebar( 'home3-lc' ); ?>
<?php } else { ?>
<h1>Home - 3rd Row - Center</h1>
<p>Go to Appearance > Widgets, and drag items into Home - 3rd Row - Center to edit this area.</p>
<?php }; ?>
</div>
<div class="span4">
<?php if ( is_active_sidebar( 'home3-lr' ) ) { ?>
<?php dynamic_sidebar( 'home3-lr' ); ?>
<?php } else { ?>
<h1>Home - 3rd Row - Right</h1>
<p>Go to Appearance > Widgets, and drag items into Home - 3rd Row - Right to edit this area.</p>
<?php }; ?>
</div>
</div>
</div>
</div> <!-- ---- end container ---->
</div> <!-- -------- end container-fluid ------->
<?php
}
get_footer();
?>
You can’t perform that action at this time.