Last active
July 15, 2017 03:30
-
-
Save martellaj/d1806bad502bf596a13e to your computer and use it in GitHub Desktop.
Converted archive.php file (WordPress 4.3) for "Bootstrap to WordPress" Udemy course
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying archive pages. | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package Bootstrap to WordPress | |
*/ | |
get_header(); ?> | |
<?php if ( have_posts() ) : ?> | |
<section class="feature-image feature-image-default-alt" data-type="background" data-speed="2"> | |
<h1> | |
<?php | |
the_archive_title(); | |
the_archive_description( '<small class="taxonomy-description">', '</small>' ); | |
?> | |
</h1> | |
</section> | |
<div class="container"> | |
<div id="primary" class="row"> | |
<main id="content" class="col-sm-8"> | |
<?php /* Start the Loop */ ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php | |
/* | |
* Include the Post-Format-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 Format name) and that will be used instead. | |
*/ | |
get_template_part( 'template-parts/content', get_post_format() ); | |
?> | |
<?php endwhile; ?> | |
<?php the_posts_navigation(); ?> | |
<?php else : ?> | |
<?php get_template_part( 'template-parts/content', 'none' ); ?> | |
<?php endif; ?> | |
</main><!-- content --> | |
<!-- SIDEBAR | |
==================================== --> | |
<aside class="col-sm-4"> | |
<?php get_sidebar(); ?> | |
</aside> | |
</div><!-- row --> | |
</div><!-- container --> | |
<?php get_footer(); ?> |
This was really useful, thanks for sharing 👍
Thank you, sir! Really helped me.
Awesome thanks!!
Thank you sir...You are a Star.....:-)
THANK YOU!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for the ugly spacing... GitHub keeps reverting to 8 spaces even though I change it.