From c1bfb6c9f714fb71a1ea0a815dbbc71b9138fed0 Mon Sep 17 00:00:00 2001 From: Ross Trottier Date: Wed, 21 Aug 2024 11:06:51 -0600 Subject: [PATCH] mailing list area --- front-page.php | 504 +++++++++++++++++++++++++------------------------ functions.php | 10 + single.php | 3 + style.css | 26 ++- 4 files changed, 297 insertions(+), 246 deletions(-) diff --git a/front-page.php b/front-page.php index 09fac2e..c754321 100644 --- a/front-page.php +++ b/front-page.php @@ -2,31 +2,31 @@
-
+

Latest

post_author ); + $author = get_userdata($post->post_author); ?> -
post_author ); - ?> - - - post_author); + ?> + + +
- + } + if (function_exists('dynamic_sidebar')) { + dynamic_sidebar('mailing_list'); + } + ?>
-

+

1, - 'category_name' => $section_category, - 'orderby' => 'post_date', - 'order' => 'DESC', - 'post_type' => 'post', - 'post_status' => 'publish' - ); - query_posts($post_section_three_featured_args); - if (have_posts()) : while (have_posts()) : the_post(); + $post_section_three_featured_args = array( + 'showposts' => 1, + 'category_name' => $section_category, + 'orderby' => 'post_date', + 'order' => 'DESC', + 'post_type' => 'post', + 'post_status' => 'publish' + ); + query_posts($post_section_three_featured_args); + if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category()[0]; - $author = get_userdata( $post->post_author ); + $author = get_userdata($post->post_author); ?> -
post_author ); - ?> - - + if (have_posts()) : while (have_posts()) : the_post(); + $category = get_the_category()[0]; + $author = get_userdata($post->post_author); + ?> + +
@@ -153,86 +160,88 @@
-

+

4, - 'category_name' => $section_category, - 'orderby' => 'post_date', - 'order' => 'DESC', - 'post_type' => 'post', - 'post_status' => 'publish' - ); - query_posts( $post_section_three_featured_args ); - if (have_posts()) : while (have_posts()) : the_post(); + $post_section_three_featured_args = array( + 'showposts' => 4, + 'category_name' => $section_category, + 'orderby' => 'post_date', + 'order' => 'DESC', + 'post_type' => 'post', + 'post_status' => 'publish' + ); + query_posts($post_section_three_featured_args); + if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category()[0]; ?> - +
-

+

1, - 'category_name' => $section_category, - 'orderby' => 'post_date', - 'order' => 'DESC', - 'post_type' => 'post', - 'post_status' => 'publish' - ); - query_posts($post_section_three_featured_args); - if (have_posts()) : while (have_posts()) : the_post(); + $post_section_three_featured_args = array( + 'showposts' => 1, + 'category_name' => $section_category, + 'orderby' => 'post_date', + 'order' => 'DESC', + 'post_type' => 'post', + 'post_status' => 'publish' + ); + query_posts($post_section_three_featured_args); + if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category()[0]; - $author = get_userdata( $post->post_author ); + $author = get_userdata($post->post_author); ?> -
post_author ); - ?> - - - post_author); + ?> + + +
- + } + if (function_exists('dynamic_sidebar')) { + dynamic_sidebar('mailing_list'); + } + ?>
- +
- -

1, - 'category_name' => $section_category, - 'orderby' => 'post_date', - 'order' => 'DESC', - 'post_type' => 'post', - 'post_status' => 'publish' - ); - query_posts($post_section_three_featured_args); - if (have_posts()) : while (have_posts()) : the_post(); + $section_category = 'Running'; + $section_category_id = get_cat_ID($section_category); + ?> +

+ 1, + 'category_name' => $section_category, + 'orderby' => 'post_date', + 'order' => 'DESC', + 'post_type' => 'post', + 'post_status' => 'publish' + ); + query_posts($post_section_three_featured_args); + if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category()[0]; - $author = get_userdata( $post->post_author ); + $author = get_userdata($post->post_author); ?> -
post_author ); - ?> - - post_author); + ?> + +
@@ -362,41 +378,43 @@
-

+

4, - 'category_name' => $section_category, - 'orderby' => 'post_date', - 'order' => 'DESC', - 'post_type' => 'post', - 'post_status' => 'publish' - ); - query_posts($post_section_three_featured_args); - if (have_posts()) : while (have_posts()) : the_post(); + $post_section_three_featured_args = array( + 'showposts' => 4, + 'category_name' => $section_category, + 'orderby' => 'post_date', + 'order' => 'DESC', + 'post_type' => 'post', + 'post_status' => 'publish' + ); + query_posts($post_section_three_featured_args); + if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category()[0]; - $author = get_userdata( $post->post_author ); + $author = get_userdata($post->post_author); ?> - +
diff --git a/functions.php b/functions.php index 9f96a5f..cfee909 100644 --- a/functions.php +++ b/functions.php @@ -31,6 +31,16 @@ function slowtwitch_menus() { register_nav_menus($locations); } +add_action( 'widgets_init', 'st_widgets_init' ); + +function st_widgets_init() { + register_sidebar( array( + 'name' => 'Mailing List', + 'id' => 'mailing_list', + 'before_widget' => '
', + 'after_widget' => '
',) ); + } + add_action( 'widgets_init', 'my_widgets_init' ); function my_widgets_init() { diff --git a/single.php b/single.php index a611ffd..1271315 100644 --- a/single.php +++ b/single.php @@ -69,6 +69,9 @@ the_ad_group(147); the_ad_group(148); } + if (function_exists('dynamic_sidebar')) { + dynamic_sidebar('mailing_list'); + } ?> diff --git a/style.css b/style.css index 984191a..d033850 100644 --- a/style.css +++ b/style.css @@ -196,6 +196,7 @@ SECTIONS .st-header-scrolled { max-height: 80px; background-color: rgba(255, 255, 255, 0.95); + z-index: 999; } .st-header-icon-bar { @@ -694,7 +695,7 @@ SECTIONS top: 85px; left: 0; align-self: start; - z-index: -1000; + /* z-index: -1000; */ } } @@ -1324,8 +1325,6 @@ a.page-numbers, } } - - .discourse-comments-area { margin: 1em 0; } @@ -1451,4 +1450,25 @@ a.page-numbers, .st-hidden-home-header-link-scrolled { left: 250px; } +} + +.st-mailchimp-signup label { + display: inline-block; + margin-bottom: .5em; +} + +.st-mailchimp-signup__button { + background-color: #0b4fa0; + border: none; + color: white; + padding: .25em .75em; + text-align: center; + text-decoration: none; + display: inline-block; + border-radius: 15px; +} + +.st-mailchimp-signup__button:hover { + background-color: #FFDB12; + color: #414b4c; } \ No newline at end of file