mailing list area

This commit is contained in:
Ross Trottier 2024-08-21 11:06:51 -06:00
parent 4b85698070
commit c1bfb6c9f7
4 changed files with 297 additions and 246 deletions

View File

@ -10,7 +10,7 @@
query_posts('showposts=1');
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);
?>
<article class="st-article-section-main-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
@ -22,7 +22,7 @@
</a>
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
<a href="<?php echo get_author_posts_url($post->post_author); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
</article>
<?php
@ -44,7 +44,7 @@
?><div class="st-article-section-sub-article-stack"><?php
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);
?>
<article class="st-article-section-sub-article">
@ -53,7 +53,9 @@
</a>
<div class="st-article-section-sub-article__text-container">
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
</div>
</a>
</article>
@ -67,20 +69,23 @@
</section>
<section class="st-ad-section st-ad-section__top">
<?php
if(function_exists('the_ad_group')){
if (function_exists('the_ad_group')) {
the_ad_group(146);
the_ad_group(147);
the_ad_group(148);
}
if (function_exists('dynamic_sidebar')) {
dynamic_sidebar('mailing_list');
}
?>
</section>
<!-- TECH SECTION -->
<section class="st-article-section st-article-section-bottom">
<?php
$section_category = 'News';
$section_category_id = get_cat_ID( $section_category );
$section_category_id = get_cat_ID($section_category);
?>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link($section_category_id); ?>" class="st-article-section-category-link">></a></h2>
<?php
$post_section_three_featured_args = array(
'showposts' => 1,
@ -93,7 +98,7 @@
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);
?>
<article class="st-article-section-main-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
@ -105,7 +110,7 @@
</a>
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
<a href="<?php echo get_author_posts_url($post->post_author); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
</article>
<?php
@ -128,7 +133,7 @@
?><div class="st-article-section-sub-article-stack"><?php
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);
?>
<article class="st-article-section-sub-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
@ -136,7 +141,9 @@
</a>
<div class="st-article-section-sub-article__text-container">
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
</div>
</a>
</article>
@ -154,9 +161,9 @@
<section class="st-article-section st-article-section-wide">
<?php
$section_category = 'Cycling';
$section_category_id = get_cat_ID( $section_category );
$section_category_id = get_cat_ID($section_category);
?>
<h2 class="st-article-section-title"><?php echo $section_category; ?><a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
<h2 class="st-article-section-title"><?php echo $section_category; ?><a href="<?php echo get_category_link($section_category_id); ?>" class="st-article-section-category-link">></a></h2>
<?php
$post_section_three_featured_args = array(
'showposts' => 4,
@ -166,7 +173,7 @@
'post_type' => 'post',
'post_status' => 'publish'
);
query_posts( $post_section_three_featured_args );
query_posts($post_section_three_featured_args);
if (have_posts()) : while (have_posts()) : the_post();
$category = get_the_category()[0];
?>
@ -176,7 +183,9 @@
</a>
<div class="st-article-section-wide-article__text-container">
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-wide-article__category-link"><?php echo $category->name; ?></a>
<a class="st-article-section-wide-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<a class="st-article-section-wide-article__title" href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
<p class="st-article-section-wide-article__excerpt"><?php the_excerpt(); ?></p>
</div>
</a>
@ -191,7 +200,7 @@
</section>
<section class="st-ad-section-long">
<?php
if(function_exists('the_ad_group')){
if (function_exists('the_ad_group')) {
the_ad_group(149);
}
?>
@ -201,9 +210,9 @@
<section class="st-article-section st-article-section-highlight">
<?php
$section_category = 'Industry';
$section_category_id = get_cat_ID( $section_category );
$section_category_id = get_cat_ID($section_category);
?>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link($section_category_id); ?>" class="st-article-section-category-link">></a></h2>
<?php
$post_section_three_featured_args = array(
'showposts' => 1,
@ -216,7 +225,7 @@
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);
?>
<article class="st-article-section-main-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
@ -228,7 +237,7 @@
</a>
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
<a href="<?php echo get_author_posts_url($post->post_author); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
</article>
<?php
@ -251,7 +260,7 @@
?><div class="st-article-section-sub-article-stack"><?php
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);
?>
<article class="st-article-section-sub-article">
@ -260,7 +269,9 @@
</a>
<div class="st-article-section-sub-article__text-container">
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
</div>
</a>
</article>
@ -274,20 +285,23 @@
</section>
<section class="st-ad-section st-ad-section__top">
<?php
if(function_exists('the_ad_group')){
if (function_exists('the_ad_group')) {
the_ad_group(146);
the_ad_group(147);
the_ad_group(148);
}
if (function_exists('dynamic_sidebar')) {
dynamic_sidebar('mailing_list');
}
?>
</section>
<section class="st-article-section st-article-section-bottom">
<?php
$section_category = 'Running';
$section_category_id = get_cat_ID( $section_category );
$section_category_id = get_cat_ID($section_category);
?>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link($section_category_id); ?>" class="st-article-section-category-link">></a></h2>
<?php
$post_section_three_featured_args = array(
'showposts' => 1,
@ -300,7 +314,7 @@
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);
?>
<article class="st-article-section-main-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
@ -312,7 +326,7 @@
</a>
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
<a href="<?php echo get_author_posts_url($post->post_author); ?>" class="st-article-section-main-article__author-link">by <?php echo $author->display_name; ?>, <?php the_time('F j, Y'); ?></a>
</article>
<?php
@ -335,7 +349,7 @@
?><div class="st-article-section-sub-article-stack"><?php
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);
?>
<article class="st-article-section-sub-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
@ -343,7 +357,9 @@
</a>
<div class="st-article-section-sub-article__text-container">
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-sub-article__category-link"><?php echo $category->name; ?></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<a class="st-article-section-sub-article__title" href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
</div>
</a>
</article>
@ -363,9 +379,9 @@
<section class="st-article-section st-article-section-wide">
<?php
$section_category = 'Training';
$section_category_id = get_cat_ID( $section_category );
$section_category_id = get_cat_ID($section_category);
?>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link($section_category_id); ?>" class="st-article-section-category-link">></a></h2>
<?php
$post_section_three_featured_args = array(
'showposts' => 4,
@ -378,7 +394,7 @@
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);
?>
<article class="st-article-section-wide-article">
<a href="<?php the_permalink(); ?>" class="st-article-section-wide-article__image-link">
@ -386,7 +402,9 @@
</a>
<div class="st-article-section-wide-article__text-container">
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-wide-article__category-link"><?php echo $category->name; ?></a>
<a class="st-article-section-wide-article__title" href="<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
<a class="st-article-section-wide-article__title" href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
<p class="st-article-section-wide-article__excerpt"><?php the_excerpt(); ?></p>
</div>
</a>

View File

@ -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' => '<div class="st-mailing-list-widget">',
'after_widget' => '</div>',) );
}
add_action( 'widgets_init', 'my_widgets_init' );
function my_widgets_init() {

View File

@ -69,6 +69,9 @@
the_ad_group(147);
the_ad_group(148);
}
if (function_exists('dynamic_sidebar')) {
dynamic_sidebar('mailing_list');
}
?>
</section>
</section>

View File

@ -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;
}
@ -1452,3 +1451,24 @@ a.page-numbers,
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;
}