Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
1a53b1f463
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
77 lines (62 sloc) 2.56 KB
<?php
/**
* The Sidebar containing the main widget areas.
*
* @package cornerstone
*/
?>
<div id="page-sidebar" class="col-md-4 widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar' ) ) : ?>
<aside id="archives" class="widget">
<h3 class="widget-title"><?php _e( 'Explore by News Category', 'cs' ); ?></h1>
<ul>
<?php
$idObj = get_category_by_slug('news-and-events');
$news_and_events = $idObj->term_id;
$idObj = get_category_by_slug('students');
$students = $idObj->term_id;
$idObj = get_category_by_slug('faculty');
$faculty = $idObj->term_id;
$idObj = get_category_by_slug('alumni');
$alumni = $idObj->term_id;
$idObj = get_category_by_slug('academics');
$academics = $idObj->term_id;
$idObj = get_category_by_slug('community-outreach');
$community_outreach = $idObj->term_id;
$idObj = get_category_by_slug('supporting-neag');
$supporting_neag = $idObj->term_id;
?>
<?php
$args = array(
'include'=> $news_and_events.','.$students.','.$faculty.','.$alumni.','.$academics.','.$community_outreach.','.$supporting_neag,
'title_li' => ''
);
wp_list_categories( $args ); ?>
</ul>
</aside>
<aside id="sidebar-in-the-media" class="widget">
<h3 class="widget-title">Neag in the Media</h1>
<ul>
<?php
$args = array( 'posts_per_page' => 7, 'category_name' => 'neag-in-the-media' );
$myposts = get_posts( $args );
foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
<li>
<a href="<?php $key="neag-in-the-media-link"; echo get_post_meta($post->ID, $key, true); ?>">
<?php the_title( '<h1 class="in-the-media-entry-title">', '</h1>' ); ?></a>
<?php the_content() ?>
</li>
<?php endforeach;
wp_reset_postdata();?>
</ul>
</aside>
<aside id="categories" class="widget">
<h3 class="widget-title">Neag News Archives</h3>
<ul>
<?php wp_get_archives( array(
'type' => 'monthly'
) ); ?>
</ul>
</aside>
<?php endif; // end sidebar widget area ?>
</div><!-- #secondary -->