Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
master
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
<?php
get_header(); ?>
<div id="body-container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="custom-span8">
<div class="section-title text-serif">
<?php $key="section-title"; echo get_post_meta($post->ID, $key, true); ?>
</div>
<h3 class="blog-article-title"><?php the_title(); ?></h3>
<h4 class="blog-h4">BY&nbsp;<?php the_author(); ?> </h4>
<hr class="title-hr" />
<div class="blog-article-meta clear">
<ul>
<li class="archive-date"><img src="<?php bloginfo('template_url'); ?>/img/icon-calendar-green.png"/> &nbsp;<?php the_date(); ?></li>
<li>|</li>
<li><img src="<?php bloginfo('template_url'); ?>/img/icon-tag-green.png"/>&nbsp;
<?php the_category(', '); ?> </li>
</ul>
</div>
<div class="span8 no-marg-left">
<div class="post content clearfix" id="post-<?php the_ID(); ?>">
<div class="entry clear">
<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
</div>
<div class="social-media-single-story clear">
<ul>
<li><h4>Share This</h4></li>
<li><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=<?php echo get_permalink( $post->ID );?>"><img src="<?php bloginfo('template_url'); ?>/img/icon-facebook-grey.png" alt="facebook icon" onmouseover="this.src='<?php bloginfo('template_url'); ?>/img/icon-facebook-green.png'" onmouseout="this.src='<?php bloginfo('template_url'); ?>/img/icon-facebook-grey.png'" /></a></li>
<li><a target="_blank" href="https://twitter.com/intent/tweet?maitlo&url=<?php echo get_permalink( $post->ID );?>"><img src="<?php bloginfo('template_url'); ?>/img/icon-twitter-grey.png" alt="twitter icon" onmouseover="this.src='<?php bloginfo('template_url'); ?>/img/icon-twitter-green.png'" onmouseout="this.src='<?php bloginfo('template_url'); ?>/img/icon-twitter-grey.png'" /></a></li>
<li><a target="_blank" href="mailto:?body=<?php echo get_permalink( $post->ID );?>"><img src="<?php bloginfo('template_url'); ?>/img/icon-mail-grey.png" alt="email icon" onmouseover="this.src='<?php bloginfo('template_url'); ?>/img/icon-mail-green.png'" onmouseout="this.src='<?php bloginfo('template_url'); ?>/img/icon-mail-grey.png'" /></a></li>
</ul>
</div>
<h2 class="related-title">Related Posts</h2>
<?php
$categories = get_the_category();
$output = array();
if($categories){
foreach($categories as $category) {
$output[] = $category->slug;
}
}
$args = array('category_name' => implode(',',$output),
'posts_per_page' => 3,
'offset' => 1,
'paged' => 1);
$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts()):
echo '<ul class="blog-related-posts">';
while ( $the_query->have_posts() ) {
$the_query->the_post();
$permalink = get_permalink($post->ID);
echo '<li><p class="title"><a href="' . $permalink . '">' . get_the_title() . '</a></p><p class="date">' . '<img src="'. get_bloginfo('template_url') .'/img/icon-calendar-green.png"/>' . get_the_date() . '</p></li>';
}
echo '</ul>';
endif;
?>
</div>
<?php endwhile; endif; ?>
</div>
</div>
<div class="sidebar">
<span class="search-form"><?php get_search_form(); ?></span>
<?php $sidebar = get_post_meta($post->ID, 'sidebar-a', true);
get_sidebar($sidebar);
?>
<?php
$category = get_category_by_slug( 'blog' );
$args = array (
'title_li' => __( 'Blog Categories' ),
'hide_empty' => 0,
'use_desc_for_title' => 0,
'child_of' => $category->term_id
);
wp_list_categories( $args ); ?>
<div class="recent-shim">
<h2 class="widget-title">Recent Posts</h2>
<?php global $wp_query;
$args = array_merge( $wp_query->query_vars,
query_posts( array ( 'category_name' => 'blog', 'posts_per_page' => 3 ) ) );
while ( have_posts() ) : the_post();
echo '<div class="recent-posts-blog"><ul>';
echo '<li class="title"><a href="'.get_permalink().'">' . get_the_title() . '</a></li>';
echo '<li class="date">'. '<img src="'. get_bloginfo('template_url') .'/img/icon-calendar-green.png"/>' . get_the_date() . '</li>';
echo '</ul></div>';
endwhile;
wp_reset_query();
?>
</div>
<?php if ( !empty($posts) && isset($posts[0])) : foreach( $posts as $post ) : setup_postdata($post); ?>
<?php endforeach; ?>
<?php else: ?>
<p><?php _e('Sorry, no recent posts.'); ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>