File: /home/imensosw/imenso.imenso.co/wp-content/themes/imensosoftware/archive.php
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package imensosoftware
*/
get_header();
?>
<section class="t-burger inner-banner" data-aos="fade-up">
<img src="<?php echo IMAGES_URL ?>/lines.svg" class="line2" width="700">
<img src="<?php echo IMAGES_URL ?>/lines.svg" class="line1" width="700">
<div class="container">
<div class="row">
<div class="col-sm-9 m-auto">
<div class="section-header text-center mt-5">
<?php the_archive_title( '<h1 class="bigger-h1">', '</h1>' );
the_archive_description( '<span class="shade">', '</span>' ); ?>
</div>
<form class="form-inline justify-content-center mt-5 blog__search">
<div class="form-group mb-2">
<input type="text" class="form-control" id="inputPassword2" placeholder="Enter your email address" autocomplete="off">
</div>
<button type="submit" class="btn btn-primary mb-2"><i class="fa fa-search"></i></button>
</form>
</div>
</div>
</div>
</section>
<section class="blog-section top">
<div class="blog__category border-bottom">
<div class="container">
<?php
$blog_cats = get_terms([
'taxonomy' => 'category',
'hide_empty' => false,
'orderby' => 'ID',
'order' => 'ASC',
]);
?>
<?php if(count($blog_cats)): $count = 0; ?>
<ul>
<?php foreach($blog_cats as $blog_cat): ?>
<?php if($blog_cat->slug != 'uncategorized'): ?>
<li> <a href="<?php echo get_term_link( $blog_cat ); ?>"><?php echo $blog_cat->name; ?></a> </li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
</div>
<div class="burger" data-aos="fade-up" style="background-color:#f8f8f8;">
<div class="container">
<div>
<main id="primary" class="site-main">
<div class="row no-gutters">
<?php
if ( have_posts() ) :
if ( is_home() && ! is_front_page() ) :
?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php
endif;
/* Start the Loop */
while ( have_posts() ) :
the_post();
/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_type() );
endwhile;
the_posts_navigation();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
</main><!-- #main -->
</div>
</div>
</div>
</section>
<?php
get_footer();
?>
<script type="text/javascript">
$(document).ready(function () {
$(window).scroll(function () {
$('.blog__category').toggleClass("fixed", ($(window).scrollTop() > 300));
});
});
</script>