| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying archive pages |
|---|
| 4 | * |
|---|
| 5 | * Used to display archive-type pages if nothing more specific matches a query. |
|---|
| 6 | * For example, puts together date-based pages if no date.php file exists. |
|---|
| 7 | * |
|---|
| 8 | * If you'd like to further customize these archive views, you may create a |
|---|
| 9 | * new template file for each one. For example, tag.php (Tag archives), |
|---|
| 10 | * category.php (Category archives), author.php (Author archives), etc. |
|---|
| 11 | * |
|---|
| 12 | */ |
|---|
| 13 | |
|---|
| 14 | get_header(); ?> |
|---|
| 15 | |
|---|
| 16 | <div id="main-content-wrapper"> |
|---|
| 17 | <div id="main-content"> |
|---|
| 18 | |
|---|
| 19 | <?php |
|---|
| 20 | the_archive_title( '<h1 class="page-title">', '</h1>' ); |
|---|
| 21 | the_archive_description( '<div class="taxonomy-description">', '</div>' ); |
|---|
| 22 | ?> |
|---|
| 23 | |
|---|
| 24 | <?php if ( have_posts() ) : ?> |
|---|
| 25 | |
|---|
| 26 | <?php |
|---|
| 27 | // starts the loop |
|---|
| 28 | while ( have_posts() ) : |
|---|
| 29 | |
|---|
| 30 | the_post(); |
|---|
| 31 | |
|---|
| 32 | /* |
|---|
| 33 | * Include the post format-specific template for the content. |
|---|
| 34 | */ |
|---|
| 35 | get_template_part( 'template-parts/content' ); |
|---|
| 36 | |
|---|
| 37 | endwhile; |
|---|
| 38 | |
|---|
| 39 | the_posts_pagination( array( |
|---|
| 40 | 'prev_next' => '', |
|---|
| 41 | ) ); |
|---|
| 42 | |
|---|
| 43 | else : |
|---|
| 44 | |
|---|
| 45 | // if no content is loaded, show the 'no found' template |
|---|
| 46 | get_template_part( 'template-parts/content', 'none' ); |
|---|
| 47 | |
|---|
| 48 | endif; ?> |
|---|
| 49 | </div><!-- #main-content --> |
|---|
| 50 | |
|---|
| 51 | <?php get_sidebar(); ?> |
|---|
| 52 | </div><!-- #main-content-wrapper --> |
|---|
| 53 | <?php get_footer(); ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.