$GLOBALS['entity_page_slug'] = get_entity_template();
$interior = "interior";
} else {
- if (has_tag('government', $post)) {
+ if (has_category('government', $post)) {
$GLOBALS['entity_page_slug'] = 'government';
- } else if (has_tag('chamber-of-commerce', $post)) {
+ } else if (has_category('chamber-of-commerce', $post)) {
$GLOBALS['entity_page_slug'] = 'chamber-of-commerce';
- } else if (has_tag('edc', $post)) {
+ } else if (has_category('edc', $post)) {
$GLOBALS['entity_page_slug'] = 'edc';
- } else if (has_tag('convention-visitors-bureau', $post)) {
+ } else if (has_category('convention-visitors-bureau', $post)) {
$GLOBALS['entity_page_slug'] = 'convention-visitors-bureau';
} else {
$GLOBALS['entity_page_slug'] = 'default';
<div id="blog-posts-over" class="small-12 medium-9 columns">
- <?php $tag_query = new WP_Query( 'tag='.$GLOBALS['entity_page_slug'] ); ?>
- <?php if($tag_query->have_posts()) : while($tag_query->have_posts()): $tag_query->the_post();?>
+ <?php $cat_query = new WP_Query( 'category_name='.$GLOBALS['entity_page_slug'] ); ?>
+ <?php if($cat_query->have_posts()) : while($cat_query->have_posts()): $cat_query->the_post();?>
<div class="row content blog-posts-container">
<!-- <div class="small-11 small-centered columns"> -->
<?php $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
<p>Recent Posts</p>
<ul>
<?php
- $args = array( 'numberposts' => '5','post_status'=>'publish' );
+ $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'category_name' => $GLOBALS['entity_page_slug'] );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a> </li> ';
);
$categories = get_categories($args);
foreach($categories as $category) {
- echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> '; }
+ if ($category->slug == $GLOBALS['entity_page_slug']) { // Make current item bold
+ echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '><b>' . $category->name.'</b></a> </li> ';
+ } else {
+ echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';
+ }
+ }
?>
</ul>
<p>Archive</p>
<span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
<?php get_template_part('parts/share-this'); ?>
</header>
-
- <?php echo the_content(); ?>
+ <?php the_advanced_excerpt('length=250&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,div,h1,h2,h3,h4,h5,h6'); ?>
</article>
\ No newline at end of file