.separator {
color: white; }
+#epicenter-excerpt {
+ margin-top: 20px; }
+ #epicenter-excerpt #epicenter-post-date {
+ color: grey;
+ font-style: italic; }
+ #epicenter-excerpt h3 {
+ font-size: 21px;
+ line-height: 1.1;
+ margin-top: 15px; }
+ #epicenter-excerpt h3 a {
+ text-decoration: underline; }
+
.search-top #searchform {
text-align: left;
display: inline-block;
function woocommerce_support() {
add_theme_support( 'woocommerce' );
}
-?>
+
+function exclude_category( $query ) {
+ if ( $query->is_home() && $query->is_main_query() ) {
+ $query->set( 'cat', '-53' );
+ }
+}
+
+add_action( 'pre_get_posts', 'exclude_category' );
+
+function content_excerpt($post_id, $length = 35){
+ $the_post = get_post($post_id); //Gets post ID
+ if( $the_post->post_excerpt ){
+ $the_excerpt = $the_post->post_excerpt;
+ } else {
+ $the_excerpt = $the_post->post_content;
+
+ }
+
+ $excerpt_length = $length; //Sets excerpt length by word count
+ $the_excerpt = strip_tags(strip_shortcodes($the_excerpt)); //Strips tags and images
+ $words = explode(' ', $the_excerpt, $excerpt_length + 1);
+
+ if(count($words) > $excerpt_length) :
+ array_pop($words);
+ array_push($words, '');
+ $the_excerpt = implode(' ', $words);
+ endif;
+
+ return $the_excerpt;
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+Template Name: RSS Feed Blog
+*/
+?>
+<?php get_header(); ?>
+<main class="blog-home">
+ <div id="head-img">
+ <div class="featured-image" style="background: url('<?php echo get_template_directory_uri();?>/assets/default.jpg') no-repeat scroll 0px bottom / cover;"></div>
+ </div>
+<!-- <article <?php // post_class() ?> id="interior-featured">
+ <?php // GLM_get_header(); ?>
+ </article> -->
+ <?php get_template_part('parts/reservation-form');?>
+ <div class="row">
+ <div id="blog-posts-over" class="small-12 medium-8 columns">
+ <?php query_posts('cat=2&posts_per_page=4'); ?>
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <div class="row content blog-posts-container">
+ <div class="small-11 small-centered columns">
+ <article id="<?php the_ID()?>" <?php post_class()?>>
+ <header class="entry-header">
+ <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
+ <span class="meta date"><?php the_time('F jS, Y') ?></span>
+ </header>
+ <?php echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+ </article>
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <div class="navigation">
+ <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+ </div><!-- /.navigation -->
+ <?php else: ?>
+ <div id="post-404" class="noposts">
+ <p><?php _e('Sorry, no results were found.');?></p>
+ </div><!-- /#post-404 -->
+ <?php endif;?>
+ <?php wp_reset_query(); ?>
+ </div>
+ <?php get_template_part('parts/blog-sidebar-r'); ?>
+ <?php get_template_part('parts/interior-footer'); ?>
+ </div>
+ <?php get_footer(); ?>
\ No newline at end of file
}
.separator{
color: white;
+}
+#epicenter-excerpt{
+ margin-top: 20px;
+ #epicenter-post-date{
+ color: grey;
+ font-style: italic;
+ }
+ h3{
+ font-size: 21px;
+ line-height: 1.1;
+ margin-top: 15px;
+ a{
+ text-decoration: underline;
+ }
+ }
}
\ No newline at end of file
</div>
</div>
<a href="<?php bloginfo('url'); ?>/e-news-sign-up/"><img alt="Newsletter Signup" src="<?php bloginfo('template_url'); ?>/assets/signup.png"></a>
+ <div id="epicenter-excerpt">
+ <div>
+ <img src="<?php echo get_template_directory_uri(); ?>/assets/logo-epicenter.png" alt="">
+ </div>
+ <div>
+ <?php $args = array(
+ 'posts_per_page' => 1,
+ 'category' => '53',
+ 'orderby' => 'date',
+ 'order' => 'DESC',
+ 'post_type' => 'post',
+ 'post_status' => 'publish',
+ 'suppress_filters' => true,
+
+ );
+ $epicenter_blog = get_posts( $args )[0];
+ $date = strtotime($epicenter_blog->post_date);
+ ?>
+ <h3><a href="<?php echo get_permalink($epicenter_blog->ID); ?>"><?php echo $epicenter_blog->post_title; ?></a></h3>
+ <div id="epicenter-post-date"><?php echo date("F j, Y",$date); ?></div>
+ <p><?php echo content_excerpt($epicenter_blog->ID, 35);?>...</p>
+ </div>
+ </div>
</div>
+
</div>