|
1 |
| -<?php |
2 |
| -/** |
3 |
| - * The template for displaying archive pages |
4 |
| - * |
5 |
| - * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ |
6 |
| - * |
7 |
| - * @package cjt |
8 |
| - */ |
9 |
| - |
10 |
| -get_header(); |
11 |
| -?> |
12 |
| - |
13 |
| - <main id="primary" class="site-main"> |
14 |
| - |
15 |
| - <?php if ( have_posts() ) : ?> |
16 |
| - |
17 |
| - <header class="page-header"> |
18 |
| - <?php |
19 |
| - the_archive_title( '<h1 class="page-title">', '</h1>' ); |
20 |
| - the_archive_description( '<div class="archive-description">', '</div>' ); |
21 |
| - ?> |
22 |
| - </header><!-- .page-header --> |
23 |
| - |
24 |
| - <?php |
25 |
| - /* Start the Loop */ |
26 |
| - while ( have_posts() ) : |
27 |
| - the_post(); |
28 |
| - |
29 |
| - /* |
30 |
| - * Include the Post-Type-specific template for the content. |
31 |
| - * If you want to override this in a child theme, then include a file |
32 |
| - * called content-___.php (where ___ is the Post Type name) and that will be used instead. |
33 |
| - */ |
34 |
| - get_template_part( 'template-parts/content', get_post_type() ); |
35 |
| - |
36 |
| - endwhile; |
37 |
| - |
38 |
| - the_posts_navigation(); |
39 |
| - |
40 |
| - else : |
41 |
| - |
42 |
| - get_template_part( 'template-parts/content', 'none' ); |
43 |
| - |
44 |
| - endif; |
45 |
| - ?> |
46 |
| - |
47 |
| - </main><!-- #main --> |
48 |
| - |
49 |
| -<?php |
50 |
| -get_sidebar(); |
51 |
| -get_footer(); |
| 1 | +<?php |
| 2 | +/** |
| 3 | + * The template for displaying archive pages |
| 4 | + * |
| 5 | + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ |
| 6 | + * |
| 7 | + * @package cjt |
| 8 | + */ |
| 9 | + |
| 10 | +get_header(); |
| 11 | +?> |
| 12 | + |
| 13 | +<main id="primary"class="bg-gray-100 min-h-screen py-8"> |
| 14 | +<div class="container mx-auto px-4"> |
| 15 | + <div class="flex flex-col lg:flex-row gap-x-4 md:gap-x-6"> |
| 16 | + <div class="w-full"> |
| 17 | + <?php if ( have_posts() ) : ?> |
| 18 | + |
| 19 | + <header class="page-header mb-5 md:mb-10"> |
| 20 | + <?php |
| 21 | + the_archive_title( '<h1 class="font-display text-3xl md:text-4xl font-semibold text-gray-800 mb-4">', '</h1>' ); |
| 22 | + the_archive_description( '<div class="text-sm text-gray-600 flex items-center space-x-2">', '</div>' ); |
| 23 | + ?> |
| 24 | + </header><!-- .page-header --> |
| 25 | + |
| 26 | + <?php |
| 27 | + /* Start the Loop */ |
| 28 | + while ( have_posts() ) : |
| 29 | + the_post(); |
| 30 | + |
| 31 | + /* |
| 32 | + * Include the Post-Type-specific template for the content. |
| 33 | + * If you want to override this in a child theme, then include a file |
| 34 | + * called content-___.php (where ___ is the Post Type name) and that will be used instead. |
| 35 | + */ |
| 36 | + get_template_part( 'template-parts/content', get_post_type() ); |
| 37 | + |
| 38 | + endwhile; |
| 39 | + |
| 40 | + the_posts_navigation(); |
| 41 | + |
| 42 | + else : |
| 43 | + |
| 44 | + get_template_part( 'template-parts/content', 'none' ); |
| 45 | + |
| 46 | + endif; |
| 47 | + ?> |
| 48 | +</div> |
| 49 | +<?php get_sidebar(); ?> |
| 50 | +</div> |
| 51 | + |
| 52 | + </div> |
| 53 | +</main> |
| 54 | + |
| 55 | +<?php |
| 56 | +get_footer(); |
0 commit comments