footer is responsive
This commit is contained in:
parent
527afe8fec
commit
fcf5635bf5
@ -1,52 +1,52 @@
|
|||||||
//Nav slide in logic
|
//Nav slide in logic
|
||||||
|
|
||||||
const nav = document.querySelector('.st-nav');
|
const nav = document.querySelector('.st-nav');
|
||||||
const openNavButton = document.querySelector('.st-open-nav');
|
const openNavButton = document.querySelector('.st-open-nav');
|
||||||
const closeNavButton = document.querySelector('.st-close-nav');
|
const closeNavButton = document.querySelector('.st-close-nav');
|
||||||
|
|
||||||
openNavButton.addEventListener('click', () => {
|
openNavButton.addEventListener('click', () => {
|
||||||
nav.classList.add('st-nav-is-open');
|
nav.classList.add('st-nav-is-open');
|
||||||
});
|
});
|
||||||
|
|
||||||
closeNavButton.addEventListener('click', () => {
|
closeNavButton.addEventListener('click', () => {
|
||||||
nav.classList.remove('st-nav-is-open');
|
nav.classList.remove('st-nav-is-open');
|
||||||
});
|
});
|
||||||
|
|
||||||
//Search slide logic
|
//Search slide logic
|
||||||
|
|
||||||
const searchOverlay = document.querySelector('.st-search-overlay');
|
const searchOverlay = document.querySelector('.st-search-overlay');
|
||||||
const openSearchButton = document.querySelector('.st-open-search');
|
const openSearchButton = document.querySelector('.st-open-search');
|
||||||
const closeSearchButton = document.querySelector('.st-close-search');
|
const closeSearchButton = document.querySelector('.st-close-search');
|
||||||
|
|
||||||
openSearchButton.addEventListener('click', () => {
|
openSearchButton.addEventListener('click', () => {
|
||||||
searchOverlay.classList.add('st-search-is-open');
|
searchOverlay.classList.add('st-search-is-open');
|
||||||
});
|
});
|
||||||
|
|
||||||
closeSearchButton.addEventListener('click', () => {
|
closeSearchButton.addEventListener('click', () => {
|
||||||
searchOverlay.classList.remove('st-search-is-open');
|
searchOverlay.classList.remove('st-search-is-open');
|
||||||
});
|
});
|
||||||
|
|
||||||
//Sticky nav logic
|
//Sticky nav logic
|
||||||
|
|
||||||
const iconBar = document.querySelector('.st-header-icon-bar');
|
const iconBar = document.querySelector('.st-header-icon-bar');
|
||||||
const siteTitle = document.querySelector('.st-site-title');
|
const siteTitle = document.querySelector('.st-site-title');
|
||||||
const header = document.querySelector('.st-header');
|
const header = document.querySelector('.st-header');
|
||||||
let lastScrollPosition = 0;
|
let lastScrollPosition = 0;
|
||||||
|
|
||||||
window.addEventListener('scroll', function(event) {
|
window.addEventListener('scroll', function(event) {
|
||||||
const scrollPosition = window.scrollY;
|
const scrollPosition = window.scrollY;
|
||||||
|
|
||||||
if(scrollPosition < 5) {
|
if(scrollPosition < 5) {
|
||||||
iconBar.classList.remove('st-icon-bar-sticky');
|
iconBar.classList.remove('st-icon-bar-sticky');
|
||||||
siteTitle.classList.remove('st-title-scrolled');
|
siteTitle.classList.remove('st-title-scrolled');
|
||||||
header.classList.remove('st-header-scrolled');
|
header.classList.remove('st-header-scrolled');
|
||||||
} else {
|
} else {
|
||||||
if(lastScrollPosition < 5) {
|
if(lastScrollPosition < 5) {
|
||||||
iconBar.classList.add('st-icon-bar-sticky');
|
iconBar.classList.add('st-icon-bar-sticky');
|
||||||
siteTitle.classList.add('st-title-scrolled');
|
siteTitle.classList.add('st-title-scrolled');
|
||||||
header.classList.add('st-header-scrolled');
|
header.classList.add('st-header-scrolled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lastScrollPosition = scrollPosition;
|
lastScrollPosition = scrollPosition;
|
||||||
});
|
});
|
90
footer.php
90
footer.php
@ -1,46 +1,46 @@
|
|||||||
<footer class="st-footer st-main-grid">
|
<footer class="st-footer st-main-grid">
|
||||||
<div class="st-footer-socials">
|
<div class="st-footer-socials">
|
||||||
<a href="https://twitter.com/slowtwitch" class="st-footer-icon"><i class="fa fa-twitter"></i></a>
|
<a href="https://twitter.com/slowtwitch" class="st-footer-icon"><i class="fa fa-twitter"></i></a>
|
||||||
<a href="https://vimeo.com/slowtwitch" class="st-footer-icon"><i class="fa fa-vimeo"></i></a>
|
<a href="https://vimeo.com/slowtwitch" class="st-footer-icon"><i class="fa fa-vimeo"></i></a>
|
||||||
<a href="https://www.facebook.com/slowtwitch/" class="st-footer-icon"><i class="fa fa-facebook"></i></a>
|
<a href="https://www.facebook.com/slowtwitch/" class="st-footer-icon"><i class="fa fa-facebook"></i></a>
|
||||||
<a href="https://www.youtube.com/slowtwitch" class="st-footer-icon"><i class="fa fa-youtube"></i></a>
|
<a href="https://www.youtube.com/slowtwitch" class="st-footer-icon"><i class="fa fa-youtube"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="st-footer-partners">
|
<div class="st-footer-partners">
|
||||||
<h4 class="st-footer-partners__title">Our Partners</h4>
|
<h4 class="st-footer-partners__title">Our Partners</h4>
|
||||||
<ul class="st-footer-partners__list">
|
<ul class="st-footer-partners__list">
|
||||||
<li class="st-footer-partners__list-item"><a href="https://www.piedmontese.com/">Certified Piedmontese</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://www.piedmontese.com/">Certified Piedmontese</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://goodlifeproteins.com/discount/slowtwitch20">Goodlife Brands</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://goodlifeproteins.com/discount/slowtwitch20">Goodlife Brands</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://www.wahoofitness.com/">Wahoo Fitness</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://www.wahoofitness.com/">Wahoo Fitness</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://profile-design.com/">Profile Design</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://profile-design.com/">Profile Design</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://zootsports.com/">Zoot Sports</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://zootsports.com/">Zoot Sports</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="http://speedplay.com/">Speedplay</a></li>
|
<li class="st-footer-partners__list-item"><a href="http://speedplay.com/">Speedplay</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://bike.shimano.com/en-US/home.html">Shimano</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://bike.shimano.com/en-US/home.html">Shimano</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://ventumracing.com/">Ventum</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://ventumracing.com/">Ventum</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="http://www.cervelo.com/en/bikes/p-series">Cervelo</a></li>
|
<li class="st-footer-partners__list-item"><a href="http://www.cervelo.com/en/bikes/p-series">Cervelo</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://www.sailfish.com/en">Sailfish</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://www.sailfish.com/en">Sailfish</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://jakroo.com/">Jakroo</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://jakroo.com/">Jakroo</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://lazersport.us/">Lazer</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://lazersport.us/">Lazer</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://www.sram.com/en/zipp">Zipp</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://www.sram.com/en/zipp">Zipp</a></li>
|
||||||
<li class="st-footer-partners__list-item"><a href="https://hedcycling.com/">HED</a></li>
|
<li class="st-footer-partners__list-item"><a href="https://hedcycling.com/">HED</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="st-footer-menu">
|
<div class="st-footer-menu">
|
||||||
<?php
|
<?php
|
||||||
wp_nav_menu(
|
wp_nav_menu(
|
||||||
array(
|
array(
|
||||||
'menu' => 'primary',
|
'menu' => 'primary',
|
||||||
'container' => '',
|
'container' => '',
|
||||||
'theme_location' => 'primary',
|
'theme_location' => 'primary',
|
||||||
'items_wrap' => '<ul class="st-footer-nav-links">%3$s</ul>'
|
'items_wrap' => '<ul class="st-footer-nav-links">%3$s</ul>'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="st-footer-site-title">Slowtwitch</h1>
|
<h1 class="st-footer-site-title">Slowtwitch</h1>
|
||||||
<p class="st-footer-copyright">© Slowtwitch - Design by Federated Computer</p>
|
<p class="st-footer-copyright">© Slowtwitch - Design by Federated Computer</p>
|
||||||
</footer>
|
</footer>
|
||||||
<?php wp_footer() ?>
|
<?php wp_footer() ?>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
772
front-page.php
772
front-page.php
@ -1,387 +1,387 @@
|
|||||||
<?php get_header() ?>
|
<?php get_header() ?>
|
||||||
|
|
||||||
<main class="st-main st-main-grid">
|
<main class="st-main st-main-grid">
|
||||||
<!-- LATEST SECTION -->
|
<!-- LATEST SECTION -->
|
||||||
<section class="st-article-section-grid">
|
<section class="st-article-section-grid">
|
||||||
<section class="st-article-section st-article-section-highlight">
|
<section class="st-article-section st-article-section-highlight">
|
||||||
<h2 class="st-article-section-title">Latest <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
<h2 class="st-article-section-title">Latest <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
query_posts('showposts=1');
|
query_posts('showposts=1');
|
||||||
if (have_posts()) : while (have_posts()) : the_post();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-main-article">
|
<article class="st-article-section-main-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||||
<h3><?php the_title(); ?></h3>
|
<h3><?php the_title(); ?></h3>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
<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>
|
</article>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
|
|
||||||
$post_section_two_args = array(
|
$post_section_two_args = array(
|
||||||
'showposts' => 5,
|
'showposts' => 5,
|
||||||
'offset' => 1,
|
'offset' => 1,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'post_status' => 'publish'
|
||||||
);
|
);
|
||||||
query_posts($post_section_two_args);
|
query_posts($post_section_two_args);
|
||||||
?><div class="st-article-section-sub-article-stack"><?php
|
?><div class="st-article-section-sub-article-stack"><?php
|
||||||
if (have_posts()) : while (have_posts()) : the_post();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article class="st-article-section-sub-article">
|
<article class="st-article-section-sub-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="st-article-section-sub-article__text-container">
|
<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 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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="st-ad-section st-ad-section__top">
|
<section class="st-ad-section st-ad-section__top">
|
||||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/vertical-ad-mock.jpg" alt="Ad Mock" class="st-ad-section-vertical-ad">
|
<img src="/wp-content/themes/slowtwitch-news/assets/images/vertical-ad-mock.jpg" alt="Ad Mock" class="st-ad-section-vertical-ad">
|
||||||
<a href="https://shop.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
<a href="https://shop.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
||||||
<div class="st-ad-section-shop-card">
|
<div class="st-ad-section-shop-card">
|
||||||
<h3 class="st-ad-section-shop-card__title">Save Big On Gear at the Slowtwitch Shop <span>></span></h3>
|
<h3 class="st-ad-section-shop-card__title">Save Big On Gear at the Slowtwitch Shop <span>></span></h3>
|
||||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-shop-card__img">
|
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-shop-card__img">
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://classified.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
<a href="https://classified.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
||||||
<div class="st-ad-section-classifieds-card">
|
<div class="st-ad-section-classifieds-card">
|
||||||
<h3 class="st-ad-section-classifieds-card__title">Buy and Sell Gear on Our Classifieds <span>></span></h3>
|
<h3 class="st-ad-section-classifieds-card__title">Buy and Sell Gear on Our Classifieds <span>></span></h3>
|
||||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-classifieds-card__img">
|
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-classifieds-card__img">
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
<!-- TECH SECTION -->
|
<!-- TECH SECTION -->
|
||||||
<section class="st-article-section st-article-section-bottom">
|
<section class="st-article-section st-article-section-bottom">
|
||||||
<h2 class="st-article-section-title">Tech <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
<h2 class="st-article-section-title">Tech <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Tech';
|
$section_category = 'Tech';
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 1,
|
'showposts' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'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();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-main-article">
|
<article class="st-article-section-main-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||||
<h3><?php the_title(); ?></h3>
|
<h3><?php the_title(); ?></h3>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
<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>
|
</article>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
|
|
||||||
$post_section_two_args = array(
|
$post_section_two_args = array(
|
||||||
'showposts' => 5,
|
'showposts' => 5,
|
||||||
'offset' => 1,
|
'offset' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'post_status' => 'publish'
|
||||||
);
|
);
|
||||||
query_posts($post_section_two_args);
|
query_posts($post_section_two_args);
|
||||||
?><div class="st-article-section-sub-article-stack"><?php
|
?><div class="st-article-section-sub-article-stack"><?php
|
||||||
if (have_posts()) : while (have_posts()) : the_post();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-sub-article">
|
<article class="st-article-section-sub-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="st-article-section-sub-article__text-container">
|
<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 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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="st-newsletter-signup">
|
<section class="st-newsletter-signup">
|
||||||
<!-- MORE STUFF HERE -->
|
<!-- MORE STUFF HERE -->
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- FLAT HORIZONTAL SECTION HERE -->
|
<!-- FLAT HORIZONTAL SECTION HERE -->
|
||||||
<section class="st-article-section st-article-section-wide">
|
<section class="st-article-section st-article-section-wide">
|
||||||
<h2 class="st-article-section-title">Gravel <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
<h2 class="st-article-section-title">Gravel <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Gravel';
|
$section_category = 'Gravel';
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 4,
|
'showposts' => 4,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'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();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-wide-article">
|
<article class="st-article-section-wide-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-wide-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-wide-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="st-article-section-wide-article__text-container">
|
<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 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>
|
<p class="st-article-section-wide-article__excerpt"><?php the_excerpt(); ?></p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</section>
|
</section>
|
||||||
<!-- LATEST SECTION -->
|
<!-- LATEST SECTION -->
|
||||||
<section class="st-article-section-grid">
|
<section class="st-article-section-grid">
|
||||||
<section class="st-article-section st-article-section-highlight">
|
<section class="st-article-section st-article-section-highlight">
|
||||||
<h2 class="st-article-section-title">Lifestyle <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
<h2 class="st-article-section-title">Lifestyle <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Lifestyle';
|
$section_category = 'Lifestyle';
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 1,
|
'showposts' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'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();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-main-article">
|
<article class="st-article-section-main-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||||
<h3><?php the_title(); ?></h3>
|
<h3><?php the_title(); ?></h3>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
<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>
|
</article>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
|
|
||||||
$post_section_two_args = array(
|
$post_section_two_args = array(
|
||||||
'showposts' => 5,
|
'showposts' => 5,
|
||||||
'offset' => 1,
|
'offset' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'post_status' => 'publish'
|
||||||
);
|
);
|
||||||
query_posts($post_section_two_args);
|
query_posts($post_section_two_args);
|
||||||
?><div class="st-article-section-sub-article-stack"><?php
|
?><div class="st-article-section-sub-article-stack"><?php
|
||||||
if (have_posts()) : while (have_posts()) : the_post();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article class="st-article-section-sub-article">
|
<article class="st-article-section-sub-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="st-article-section-sub-article__text-container">
|
<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 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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="st-ad-section st-ad-section__top">
|
<section class="st-ad-section st-ad-section__top">
|
||||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/vertical-ad-mock.jpg" alt="Ad Mock" class="st-ad-section-vertical-ad">
|
<img src="/wp-content/themes/slowtwitch-news/assets/images/vertical-ad-mock.jpg" alt="Ad Mock" class="st-ad-section-vertical-ad">
|
||||||
<a href="https://shop.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
<a href="https://shop.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
||||||
<div class="st-ad-section-shop-card">
|
<div class="st-ad-section-shop-card">
|
||||||
<h3 class="st-ad-section-shop-card__title">Save Big On Gear at the Slowtwitch Shop <span>></span></h3>
|
<h3 class="st-ad-section-shop-card__title">Save Big On Gear at the Slowtwitch Shop <span>></span></h3>
|
||||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-shop-card__img">
|
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-shop-card__img">
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://classified.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
<a href="https://classified.slowtwitch.com/" class="st-ad-section-shop-card-link">
|
||||||
<div class="st-ad-section-classifieds-card">
|
<div class="st-ad-section-classifieds-card">
|
||||||
<h3 class="st-ad-section-classifieds-card__title">Buy and Sell Gear on Our Classifieds <span>></span></h3>
|
<h3 class="st-ad-section-classifieds-card__title">Buy and Sell Gear on Our Classifieds <span>></span></h3>
|
||||||
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-classifieds-card__img">
|
<img src="/wp-content/themes/slowtwitch-news/assets/images/slowtwitch-shop.png" alt="" class="st-ad-section-classifieds-card__img">
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="st-article-section st-article-section-bottom">
|
<section class="st-article-section st-article-section-bottom">
|
||||||
<h2 class="st-article-section-title">Opinion <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
<h2 class="st-article-section-title">Opinion <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Opinion';
|
$section_category = 'Opinion';
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 1,
|
'showposts' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'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();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-main-article">
|
<article class="st-article-section-main-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-main-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
<a href="<?php echo home_url($category->slug); ?>" class="st-article-section-main-article__category-link"><?php echo $category->name; ?></a>
|
||||||
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
<a class="st-article-section-main-article__title" href="<?php the_permalink(); ?>">
|
||||||
<h3><?php the_title(); ?></h3>
|
<h3><?php the_title(); ?></h3>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<p class="st-article-section-main-article__excerpt"><?php echo get_the_excerpt(); ?></p>
|
<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>
|
</article>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
|
|
||||||
$post_section_two_args = array(
|
$post_section_two_args = array(
|
||||||
'showposts' => 5,
|
'showposts' => 5,
|
||||||
'offset' => 1,
|
'offset' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'post_status' => 'publish'
|
||||||
);
|
);
|
||||||
query_posts($post_section_two_args);
|
query_posts($post_section_two_args);
|
||||||
?><div class="st-article-section-sub-article-stack"><?php
|
?><div class="st-article-section-sub-article-stack"><?php
|
||||||
if (have_posts()) : while (have_posts()) : the_post();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-sub-article">
|
<article class="st-article-section-sub-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-sub-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="st-article-section-sub-article__text-container">
|
<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 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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="st-newsletter-signup">
|
<section class="st-newsletter-signup">
|
||||||
<!-- MORE STUFF HERE -->
|
<!-- MORE STUFF HERE -->
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<!-- FLAT HORIZONTAL SECTION HERE -->
|
<!-- FLAT HORIZONTAL SECTION HERE -->
|
||||||
<section class="st-article-section st-article-section-wide">
|
<section class="st-article-section st-article-section-wide">
|
||||||
<h2 class="st-article-section-title">Race Reports <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
<h2 class="st-article-section-title">Race Reports <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'race-reports';
|
$section_category = 'race-reports';
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 4,
|
'showposts' => 4,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'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();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
$author = get_userdata( $post->post_author );
|
$author = get_userdata( $post->post_author );
|
||||||
?>
|
?>
|
||||||
<article class="st-article-section-wide-article">
|
<article class="st-article-section-wide-article">
|
||||||
<a href="<?php the_permalink(); ?>" class="st-article-section-wide-article__image-link">
|
<a href="<?php the_permalink(); ?>" class="st-article-section-wide-article__image-link">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail(); ?>
|
||||||
</a>
|
</a>
|
||||||
<div class="st-article-section-wide-article__text-container">
|
<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 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>
|
<p class="st-article-section-wide-article__excerpt"><?php the_excerpt(); ?></p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<?php get_footer() ?>
|
<?php get_footer() ?>
|
544
functions.php
544
functions.php
@ -1,273 +1,273 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//Add Title Tag Theme support
|
//Add Title Tag Theme support
|
||||||
add_action('after_setup_theme', 'slowtwitch_theme_support');
|
add_action('after_setup_theme', 'slowtwitch_theme_support');
|
||||||
|
|
||||||
function slowtwitch_theme_support() {
|
function slowtwitch_theme_support() {
|
||||||
add_theme_support('title-tag');
|
add_theme_support('title-tag');
|
||||||
}
|
}
|
||||||
|
|
||||||
// enqueue styles
|
// enqueue styles
|
||||||
|
|
||||||
add_action('wp_enqueue_scripts', 'slowtwitch_register_styles_scripts');
|
add_action('wp_enqueue_scripts', 'slowtwitch_register_styles_scripts');
|
||||||
|
|
||||||
function slowtwitch_register_styles_scripts() {
|
function slowtwitch_register_styles_scripts() {
|
||||||
wp_enqueue_style('slowtwitch-styles', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get('version'), 'all');
|
wp_enqueue_style('slowtwitch-styles', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get('version'), 'all');
|
||||||
wp_enqueue_style( 'rubik font', 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap' );
|
wp_enqueue_style( 'rubik font', 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap' );
|
||||||
wp_enqueue_script( 'slowtwitch-nav-script', get_template_directory_uri() . '/assets/js/st-nav.js', NULL, NULL, true );
|
wp_enqueue_script( 'slowtwitch-nav-script', get_template_directory_uri() . '/assets/js/st-nav.js', NULL, NULL, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up menu areas
|
// set up menu areas
|
||||||
|
|
||||||
add_action( 'init', 'slowtwitch_menus' );
|
add_action( 'init', 'slowtwitch_menus' );
|
||||||
|
|
||||||
function slowtwitch_menus() {
|
function slowtwitch_menus() {
|
||||||
$locations = array(
|
$locations = array(
|
||||||
'primary' => 'Primary Menu',
|
'primary' => 'Primary Menu',
|
||||||
'footer' => 'Footer Menu'
|
'footer' => 'Footer Menu'
|
||||||
);
|
);
|
||||||
|
|
||||||
register_nav_menus($locations);
|
register_nav_menus($locations);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action( 'widgets_init', 'my_widgets_init' );
|
add_action( 'widgets_init', 'my_widgets_init' );
|
||||||
|
|
||||||
function my_widgets_init() {
|
function my_widgets_init() {
|
||||||
|
|
||||||
register_sidebar( array(
|
register_sidebar( array(
|
||||||
'id' => 'slowtwitch-front-page',
|
'id' => 'slowtwitch-front-page',
|
||||||
'name' => 'Widgets for Front Page',
|
'name' => 'Widgets for Front Page',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Breadcrumbs
|
// Breadcrumbs
|
||||||
function custom_breadcrumbs() {
|
function custom_breadcrumbs() {
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
$separator = '>';
|
$separator = '>';
|
||||||
$breadcrums_id = 'breadcrumbs';
|
$breadcrums_id = 'breadcrumbs';
|
||||||
$breadcrums_class = 'breadcrumbs';
|
$breadcrums_class = 'breadcrumbs';
|
||||||
$home_title = 'Homepage';
|
$home_title = 'Homepage';
|
||||||
|
|
||||||
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
||||||
$custom_taxonomy = 'product_cat';
|
$custom_taxonomy = 'product_cat';
|
||||||
|
|
||||||
// Get the query & post information
|
// Get the query & post information
|
||||||
global $post,$wp_query;
|
global $post,$wp_query;
|
||||||
|
|
||||||
// Do not display on the homepage
|
// Do not display on the homepage
|
||||||
if ( !is_front_page() ) {
|
if ( !is_front_page() ) {
|
||||||
|
|
||||||
// Build the breadcrums
|
// Build the breadcrums
|
||||||
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
echo '<ul id="' . $breadcrums_id . '" class="' . $breadcrums_class . '">';
|
||||||
|
|
||||||
// Home page
|
// Home page
|
||||||
echo '<li class="item-home"><a class="bread-link bread-home" href="' . get_home_url() . '" title="' . $home_title . '">' . $home_title . '</a></li>';
|
echo '<li class="item-home"><a class="bread-link bread-home" href="' . get_home_url() . '" title="' . $home_title . '">' . $home_title . '</a></li>';
|
||||||
echo '<li class="separator separator-home"> ' . $separator . ' </li>';
|
echo '<li class="separator separator-home"> ' . $separator . ' </li>';
|
||||||
|
|
||||||
if ( is_archive() && !is_tax() && !is_category() && !is_tag() ) {
|
if ( is_archive() && !is_tax() && !is_category() && !is_tag() ) {
|
||||||
|
|
||||||
echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title('', false) . '</strong></li>';
|
echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . post_type_archive_title('', false) . '</strong></li>';
|
||||||
|
|
||||||
} else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
|
} else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
|
||||||
|
|
||||||
// If post is a custom post type
|
// If post is a custom post type
|
||||||
$post_type = get_post_type();
|
$post_type = get_post_type();
|
||||||
|
|
||||||
// If it is a custom post type display name and link
|
// If it is a custom post type display name and link
|
||||||
if($post_type != 'post') {
|
if($post_type != 'post') {
|
||||||
|
|
||||||
$post_type_object = get_post_type_object($post_type);
|
$post_type_object = get_post_type_object($post_type);
|
||||||
$post_type_archive = get_post_type_archive_link($post_type);
|
$post_type_archive = get_post_type_archive_link($post_type);
|
||||||
|
|
||||||
echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' . $post_type_archive . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
|
echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' . $post_type_archive . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
|
||||||
echo '<li class="separator"> ' . $separator . ' </li>';
|
echo '<li class="separator"> ' . $separator . ' </li>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$custom_tax_name = get_queried_object()->name;
|
$custom_tax_name = get_queried_object()->name;
|
||||||
echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . $custom_tax_name . '</strong></li>';
|
echo '<li class="item-current item-archive"><strong class="bread-current bread-archive">' . $custom_tax_name . '</strong></li>';
|
||||||
|
|
||||||
} else if ( is_single() ) {
|
} else if ( is_single() ) {
|
||||||
|
|
||||||
// If post is a custom post type
|
// If post is a custom post type
|
||||||
$post_type = get_post_type();
|
$post_type = get_post_type();
|
||||||
|
|
||||||
// If it is a custom post type display name and link
|
// If it is a custom post type display name and link
|
||||||
if($post_type != 'post') {
|
if($post_type != 'post') {
|
||||||
|
|
||||||
$post_type_object = get_post_type_object($post_type);
|
$post_type_object = get_post_type_object($post_type);
|
||||||
$post_type_archive = get_post_type_archive_link($post_type);
|
$post_type_archive = get_post_type_archive_link($post_type);
|
||||||
|
|
||||||
echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' . $post_type_archive . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
|
echo '<li class="item-cat item-custom-post-type-' . $post_type . '"><a class="bread-cat bread-custom-post-type-' . $post_type . '" href="' . $post_type_archive . '" title="' . $post_type_object->labels->name . '">' . $post_type_object->labels->name . '</a></li>';
|
||||||
echo '<li class="separator"> ' . $separator . ' </li>';
|
echo '<li class="separator"> ' . $separator . ' </li>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get post category info
|
// Get post category info
|
||||||
$category = get_the_category();
|
$category = get_the_category();
|
||||||
|
|
||||||
if(!empty($category)) {
|
if(!empty($category)) {
|
||||||
|
|
||||||
// Get last category post is in
|
// Get last category post is in
|
||||||
$last_category = end(array_values($category));
|
$last_category = end(array_values($category));
|
||||||
|
|
||||||
// Get parent any categories and create array
|
// Get parent any categories and create array
|
||||||
$get_cat_parents = rtrim(get_category_parents($last_category->term_id, true, ','),',');
|
$get_cat_parents = rtrim(get_category_parents($last_category->term_id, true, ','),',');
|
||||||
$cat_parents = explode(',',$get_cat_parents);
|
$cat_parents = explode(',',$get_cat_parents);
|
||||||
|
|
||||||
// Loop through parent categories and store in variable $cat_display
|
// Loop through parent categories and store in variable $cat_display
|
||||||
$cat_display = '';
|
$cat_display = '';
|
||||||
foreach($cat_parents as $parents) {
|
foreach($cat_parents as $parents) {
|
||||||
$cat_display .= '<li class="item-cat">'.$parents.'</li>';
|
$cat_display .= '<li class="item-cat">'.$parents.'</li>';
|
||||||
$cat_display .= '<li class="separator"> ' . $separator . ' </li>';
|
$cat_display .= '<li class="separator"> ' . $separator . ' </li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's a custom post type within a custom taxonomy
|
// If it's a custom post type within a custom taxonomy
|
||||||
$taxonomy_exists = taxonomy_exists($custom_taxonomy);
|
$taxonomy_exists = taxonomy_exists($custom_taxonomy);
|
||||||
if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
|
if(empty($last_category) && !empty($custom_taxonomy) && $taxonomy_exists) {
|
||||||
|
|
||||||
$taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
|
$taxonomy_terms = get_the_terms( $post->ID, $custom_taxonomy );
|
||||||
$cat_id = $taxonomy_terms[0]->term_id;
|
$cat_id = $taxonomy_terms[0]->term_id;
|
||||||
$cat_nicename = $taxonomy_terms[0]->slug;
|
$cat_nicename = $taxonomy_terms[0]->slug;
|
||||||
$cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
|
$cat_link = get_term_link($taxonomy_terms[0]->term_id, $custom_taxonomy);
|
||||||
$cat_name = $taxonomy_terms[0]->name;
|
$cat_name = $taxonomy_terms[0]->name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the post is in a category
|
// Check if the post is in a category
|
||||||
if(!empty($last_category)) {
|
if(!empty($last_category)) {
|
||||||
echo $cat_display;
|
echo $cat_display;
|
||||||
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</strong></li>';
|
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</strong></li>';
|
||||||
|
|
||||||
// Else if post is in a custom taxonomy
|
// Else if post is in a custom taxonomy
|
||||||
} else if(!empty($cat_id)) {
|
} else if(!empty($cat_id)) {
|
||||||
|
|
||||||
echo '<li class="item-cat item-cat-' . $cat_id . ' item-cat-' . $cat_nicename . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $cat_nicename . '" href="' . $cat_link . '" title="' . $cat_name . '">' . $cat_name . '</a></li>';
|
echo '<li class="item-cat item-cat-' . $cat_id . ' item-cat-' . $cat_nicename . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $cat_nicename . '" href="' . $cat_link . '" title="' . $cat_name . '">' . $cat_name . '</a></li>';
|
||||||
echo '<li class="separator"> ' . $separator . ' </li>';
|
echo '<li class="separator"> ' . $separator . ' </li>';
|
||||||
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</strong></li>';
|
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</strong></li>';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</strong></li>';
|
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</strong></li>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( is_category() ) {
|
} else if ( is_category() ) {
|
||||||
|
|
||||||
// Category page
|
// Category page
|
||||||
echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
|
echo '<li class="item-current item-cat"><strong class="bread-current bread-cat">' . single_cat_title('', false) . '</strong></li>';
|
||||||
|
|
||||||
} else if ( is_page() ) {
|
} else if ( is_page() ) {
|
||||||
|
|
||||||
// Standard page
|
// Standard page
|
||||||
if( $post->post_parent ){
|
if( $post->post_parent ){
|
||||||
|
|
||||||
// If child page, get parents
|
// If child page, get parents
|
||||||
$anc = get_post_ancestors( $post->ID );
|
$anc = get_post_ancestors( $post->ID );
|
||||||
|
|
||||||
// Get parents in the right order
|
// Get parents in the right order
|
||||||
$anc = array_reverse($anc);
|
$anc = array_reverse($anc);
|
||||||
|
|
||||||
// Parent page loop
|
// Parent page loop
|
||||||
if ( !isset( $parents ) ) $parents = null;
|
if ( !isset( $parents ) ) $parents = null;
|
||||||
foreach ( $anc as $ancestor ) {
|
foreach ( $anc as $ancestor ) {
|
||||||
$parents .= '<li class="item-parent item-parent-' . $ancestor . '"><a class="bread-parent bread-parent-' . $ancestor . '" href="' . get_permalink($ancestor) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li>';
|
$parents .= '<li class="item-parent item-parent-' . $ancestor . '"><a class="bread-parent bread-parent-' . $ancestor . '" href="' . get_permalink($ancestor) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li>';
|
||||||
$parents .= '<li class="separator separator-' . $ancestor . '"> ' . $separator . ' </li>';
|
$parents .= '<li class="separator separator-' . $ancestor . '"> ' . $separator . ' </li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display parent pages
|
// Display parent pages
|
||||||
echo $parents;
|
echo $parents;
|
||||||
|
|
||||||
// Current page
|
// Current page
|
||||||
echo '<li class="item-current item-' . $post->ID . '"><strong title="' . get_the_title() . '"> ' . get_the_title() . '</strong></li>';
|
echo '<li class="item-current item-' . $post->ID . '"><strong title="' . get_the_title() . '"> ' . get_the_title() . '</strong></li>';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Just display current page if not parents
|
// Just display current page if not parents
|
||||||
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '"> ' . get_the_title() . '</strong></li>';
|
echo '<li class="item-current item-' . $post->ID . '"><strong class="bread-current bread-' . $post->ID . '"> ' . get_the_title() . '</strong></li>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ( is_tag() ) {
|
} else if ( is_tag() ) {
|
||||||
|
|
||||||
// Tag page
|
// Tag page
|
||||||
|
|
||||||
// Get tag information
|
// Get tag information
|
||||||
$term_id = get_query_var('tag_id');
|
$term_id = get_query_var('tag_id');
|
||||||
$taxonomy = 'post_tag';
|
$taxonomy = 'post_tag';
|
||||||
$args = 'include=' . $term_id;
|
$args = 'include=' . $term_id;
|
||||||
$terms = get_terms( $taxonomy, $args );
|
$terms = get_terms( $taxonomy, $args );
|
||||||
$get_term_id = $terms[0]->term_id;
|
$get_term_id = $terms[0]->term_id;
|
||||||
$get_term_slug = $terms[0]->slug;
|
$get_term_slug = $terms[0]->slug;
|
||||||
$get_term_name = $terms[0]->name;
|
$get_term_name = $terms[0]->name;
|
||||||
|
|
||||||
// Display the tag name
|
// Display the tag name
|
||||||
echo '<li class="item-current item-tag-' . $get_term_id . ' item-tag-' . $get_term_slug . '"><strong class="bread-current bread-tag-' . $get_term_id . ' bread-tag-' . $get_term_slug . '">' . $get_term_name . '</strong></li>';
|
echo '<li class="item-current item-tag-' . $get_term_id . ' item-tag-' . $get_term_slug . '"><strong class="bread-current bread-tag-' . $get_term_id . ' bread-tag-' . $get_term_slug . '">' . $get_term_name . '</strong></li>';
|
||||||
|
|
||||||
} elseif ( is_day() ) {
|
} elseif ( is_day() ) {
|
||||||
|
|
||||||
// Day archive
|
// Day archive
|
||||||
|
|
||||||
// Year link
|
// Year link
|
||||||
echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . ' Archives</a></li>';
|
echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . ' Archives</a></li>';
|
||||||
echo '<li class="separator separator-' . get_the_time('Y') . '"> ' . $separator . ' </li>';
|
echo '<li class="separator separator-' . get_the_time('Y') . '"> ' . $separator . ' </li>';
|
||||||
|
|
||||||
// Month link
|
// Month link
|
||||||
echo '<li class="item-month item-month-' . get_the_time('m') . '"><a class="bread-month bread-month-' . get_the_time('m') . '" href="' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '" title="' . get_the_time('M') . '">' . get_the_time('M') . ' Archives</a></li>';
|
echo '<li class="item-month item-month-' . get_the_time('m') . '"><a class="bread-month bread-month-' . get_the_time('m') . '" href="' . get_month_link( get_the_time('Y'), get_the_time('m') ) . '" title="' . get_the_time('M') . '">' . get_the_time('M') . ' Archives</a></li>';
|
||||||
echo '<li class="separator separator-' . get_the_time('m') . '"> ' . $separator . ' </li>';
|
echo '<li class="separator separator-' . get_the_time('m') . '"> ' . $separator . ' </li>';
|
||||||
|
|
||||||
// Day display
|
// Day display
|
||||||
echo '<li class="item-current item-' . get_the_time('j') . '"><strong class="bread-current bread-' . get_the_time('j') . '"> ' . get_the_time('jS') . ' ' . get_the_time('M') . ' Archives</strong></li>';
|
echo '<li class="item-current item-' . get_the_time('j') . '"><strong class="bread-current bread-' . get_the_time('j') . '"> ' . get_the_time('jS') . ' ' . get_the_time('M') . ' Archives</strong></li>';
|
||||||
|
|
||||||
} else if ( is_month() ) {
|
} else if ( is_month() ) {
|
||||||
|
|
||||||
// Month Archive
|
// Month Archive
|
||||||
|
|
||||||
// Year link
|
// Year link
|
||||||
echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . ' Archives</a></li>';
|
echo '<li class="item-year item-year-' . get_the_time('Y') . '"><a class="bread-year bread-year-' . get_the_time('Y') . '" href="' . get_year_link( get_the_time('Y') ) . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . ' Archives</a></li>';
|
||||||
echo '<li class="separator separator-' . get_the_time('Y') . '"> ' . $separator . ' </li>';
|
echo '<li class="separator separator-' . get_the_time('Y') . '"> ' . $separator . ' </li>';
|
||||||
|
|
||||||
// Month display
|
// Month display
|
||||||
echo '<li class="item-month item-month-' . get_the_time('m') . '"><strong class="bread-month bread-month-' . get_the_time('m') . '" title="' . get_the_time('M') . '">' . get_the_time('M') . ' Archives</strong></li>';
|
echo '<li class="item-month item-month-' . get_the_time('m') . '"><strong class="bread-month bread-month-' . get_the_time('m') . '" title="' . get_the_time('M') . '">' . get_the_time('M') . ' Archives</strong></li>';
|
||||||
|
|
||||||
} else if ( is_year() ) {
|
} else if ( is_year() ) {
|
||||||
|
|
||||||
// Display year archive
|
// Display year archive
|
||||||
echo '<li class="item-current item-current-' . get_the_time('Y') . '"><strong class="bread-current bread-current-' . get_the_time('Y') . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . ' Archives</strong></li>';
|
echo '<li class="item-current item-current-' . get_the_time('Y') . '"><strong class="bread-current bread-current-' . get_the_time('Y') . '" title="' . get_the_time('Y') . '">' . get_the_time('Y') . ' Archives</strong></li>';
|
||||||
|
|
||||||
} else if ( is_author() ) {
|
} else if ( is_author() ) {
|
||||||
|
|
||||||
// Auhor archive
|
// Auhor archive
|
||||||
|
|
||||||
// Get the author information
|
// Get the author information
|
||||||
global $author;
|
global $author;
|
||||||
$userdata = get_userdata( $author );
|
$userdata = get_userdata( $author );
|
||||||
|
|
||||||
// Display author name
|
// Display author name
|
||||||
echo '<li class="item-current item-current-' . $userdata->user_nicename . '"><strong class="bread-current bread-current-' . $userdata->user_nicename . '" title="' . $userdata->display_name . '">' . 'Author: ' . $userdata->display_name . '</strong></li>';
|
echo '<li class="item-current item-current-' . $userdata->user_nicename . '"><strong class="bread-current bread-current-' . $userdata->user_nicename . '" title="' . $userdata->display_name . '">' . 'Author: ' . $userdata->display_name . '</strong></li>';
|
||||||
|
|
||||||
} else if ( get_query_var('paged') ) {
|
} else if ( get_query_var('paged') ) {
|
||||||
|
|
||||||
// Paginated archives
|
// Paginated archives
|
||||||
echo '<li class="item-current item-current-' . get_query_var('paged') . '"><strong class="bread-current bread-current-' . get_query_var('paged') . '" title="Page ' . get_query_var('paged') . '">'.__('Page') . ' ' . get_query_var('paged') . '</strong></li>';
|
echo '<li class="item-current item-current-' . get_query_var('paged') . '"><strong class="bread-current bread-current-' . get_query_var('paged') . '" title="Page ' . get_query_var('paged') . '">'.__('Page') . ' ' . get_query_var('paged') . '</strong></li>';
|
||||||
|
|
||||||
} else if ( is_search() ) {
|
} else if ( is_search() ) {
|
||||||
|
|
||||||
// Search results page
|
// Search results page
|
||||||
echo '<li class="item-current item-current-' . get_search_query() . '"><strong class="bread-current bread-current-' . get_search_query() . '" title="Search results for: ' . get_search_query() . '">Search results for: ' . get_search_query() . '</strong></li>';
|
echo '<li class="item-current item-current-' . get_search_query() . '"><strong class="bread-current bread-current-' . get_search_query() . '" title="Search results for: ' . get_search_query() . '">Search results for: ' . get_search_query() . '</strong></li>';
|
||||||
|
|
||||||
} elseif ( is_404() ) {
|
} elseif ( is_404() ) {
|
||||||
|
|
||||||
// 404 page
|
// 404 page
|
||||||
echo '<li>' . 'Error 404' . '</li>';
|
echo '<li>' . 'Error 404' . '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
130
header.php
130
header.php
@ -1,66 +1,66 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<!-- Basic Page Needs
|
<!-- Basic Page Needs
|
||||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
|
||||||
<!-- Mobile Specific Metas
|
<!-- Mobile Specific Metas
|
||||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
|
||||||
<?php wp_head() ?>
|
<?php wp_head() ?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header class="st-header st-main-grid">
|
<header class="st-header st-main-grid">
|
||||||
|
|
||||||
<div class="st-header-icon-bar">
|
<div class="st-header-icon-bar">
|
||||||
<a href="#" class="st-chip st-chip-primary">forum</a>
|
<a href="#" class="st-chip st-chip-primary">forum</a>
|
||||||
<?php
|
<?php
|
||||||
if (is_user_logged_in() == false) {
|
if (is_user_logged_in() == false) {
|
||||||
?>
|
?>
|
||||||
<a href="#" class="st-chip st-chip-secondary">join</a>
|
<a href="#" class="st-chip st-chip-secondary">join</a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="#" class="st-header-icon"><i class="fa fa-user"></i></a>
|
<a href="#" class="st-header-icon"><i class="fa fa-user"></i></a>
|
||||||
<button class="st-nav-btn st-open-search" aria-label="Open Search"><i class="fa fa-search"></i></button>
|
<button class="st-nav-btn st-open-search" aria-label="Open Search"><i class="fa fa-search"></i></button>
|
||||||
<button class="st-nav-btn st-open-nav" aria-label="Open Navigation">☰</button>
|
<button class="st-nav-btn st-open-nav" aria-label="Open Navigation">☰</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 class="st-site-title">Slowtwitch</h1>
|
<h1 class="st-site-title">Slowtwitch</h1>
|
||||||
|
|
||||||
<nav class="st-nav st-main-grid">
|
<nav class="st-nav st-main-grid">
|
||||||
<button class="st-nav-btn st-close-nav" aria-label="Close Navigation">×</button>
|
<button class="st-nav-btn st-close-nav" aria-label="Close Navigation">×</button>
|
||||||
<?php
|
<?php
|
||||||
wp_nav_menu(
|
wp_nav_menu(
|
||||||
array(
|
array(
|
||||||
'menu' => 'primary',
|
'menu' => 'primary',
|
||||||
'container' => '',
|
'container' => '',
|
||||||
'theme_location' => 'primary',
|
'theme_location' => 'primary',
|
||||||
'items_wrap' => '<ul class="st-nav-links">%3$s</ul>'
|
'items_wrap' => '<ul class="st-nav-links">%3$s</ul>'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="st-search-overlay st-main-grid">
|
<div class="st-search-overlay st-main-grid">
|
||||||
<button class="st-nav-btn st-close-search" aria-label="Close Search">×</button>
|
<button class="st-nav-btn st-close-search" aria-label="Close Search">×</button>
|
||||||
<form class="st-search-form" method="get" action="/">
|
<form class="st-search-form" method="get" action="/">
|
||||||
<div class="st-searchbar-container">
|
<div class="st-searchbar-container">
|
||||||
<input type="text" class="st-search-box" name="s" id="s" placeholder="What are you looking for?" />
|
<input type="text" class="st-search-box" name="s" id="s" placeholder="What are you looking for?" />
|
||||||
<button class="st-nav-btn st-btn-search">
|
<button class="st-nav-btn st-btn-search">
|
||||||
<i class="fa fa-search st-open-search"></i>
|
<i class="fa fa-search st-open-search"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
Loading…
Reference in New Issue
Block a user