From: Anthony Talarico Date: Tue, 30 Oct 2018 13:51:05 +0000 (-0400) Subject: adding logo file, adding front page sidebar epicenter blog excerpt X-Git-Tag: 1.2.40^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=d4a3d135fa3e71eb3d8b36553f3f69ba420dfd65;p=WP-Themes%2Fmountpleasantwow.git adding logo file, adding front page sidebar epicenter blog excerpt --- diff --git a/assets/logo-epicenter.png b/assets/logo-epicenter.png new file mode 100644 index 0000000..9460125 Binary files /dev/null and b/assets/logo-epicenter.png differ diff --git a/css/app.css b/css/app.css index 4c9f38d..6d0369e 100644 --- a/css/app.css +++ b/css/app.css @@ -8246,6 +8246,18 @@ a#calendar-link { .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; diff --git a/functions.php b/functions.php index fd0bb56..2b5fc00 100644 --- a/functions.php +++ b/functions.php @@ -575,4 +575,34 @@ add_action( 'after_setup_theme', 'woocommerce_support' ); 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 diff --git a/rssfeed.php b/rssfeed.php new file mode 100644 index 0000000..b3a90b3 --- /dev/null +++ b/rssfeed.php @@ -0,0 +1,44 @@ + + +
+
+ +
+ + +
+
+ + +
+
+
> +
+

+ +
+ +
+
+
+ + + +
+

+
+ + +
+ + +
+ \ No newline at end of file diff --git a/scss/_sidebar.scss b/scss/_sidebar.scss index 1bd5b49..94a551d 100644 --- a/scss/_sidebar.scss +++ b/scss/_sidebar.scss @@ -232,4 +232,19 @@ a#calendar-link { } .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 diff --git a/sidebar.php b/sidebar.php index 29b38c3..9dfda4a 100644 --- a/sidebar.php +++ b/sidebar.php @@ -18,5 +18,29 @@ Newsletter Signup +
+
+ +
+
+ 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); + ?> +

post_title; ?>

+
+

ID, 35);?>...

+
+
+