-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.php
More file actions
36 lines (32 loc) · 894 Bytes
/
archive.php
File metadata and controls
36 lines (32 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
* Template for a generic archive page.
*/
get_header(); ?>
<div class="one-col-content">
<div class="main-title">
Archive
</div><!-- .main-title -->
<?php $categories = array( 'about', 'team', 'studies', 'community', 'participate', 'join' );
foreach ( $categories as $category ) : ?>
<div class="one-col-post">
<h1><?php echo ucfirst( $category ); ?></h1>
<ul>
<?php
$args = array(
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'category_name' => $category,
);
$results = get_posts( $args );
foreach ( $results as $post ) :
setup_postdata($post); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endforeach;
wp_reset_postdata(); ?>
</ul>
</div><!-- .one-col-post -->
<?php endforeach; ?>
</div><!-- .one-col-content -->
<?php get_footer(); ?>