This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcustom-archive.php
More file actions
executable file
·105 lines (86 loc) · 3.15 KB
/
custom-archive.php
File metadata and controls
executable file
·105 lines (86 loc) · 3.15 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
*
* Template Name: Custom Archive
*
* Template for displaying a custom archives page, sorted by date, category and more.
*
* @package Author
* @since Author 1.0
*/
get_header(); ?>
<div id="content-wrap" class="clearfix">
<div id="content">
<!-- post navigation -->
<?php get_template_part( 'template-title' ); ?>
<div class="post-wrap">
<!-- load the posts -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div <?php post_class('post'); ?>>
<div class="box">
<!-- load the featured image -->
<?php if ( has_post_thumbnail() ) { ?>
<a class="featured-image" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'large-image' ); ?></a>
<?php } ?>
<div class="frame">
<div class="title-wrap">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</div><!-- title wrap -->
<div class="post-content">
<?php the_content( __( 'Read More', 'author' ) ); ?>
<div id="archive">
<div class="archive-column">
<h4><?php _e( 'Recent Posts', 'author' ); ?></h4>
<ul>
<?php wp_get_archives( 'type=postbypost&limit=20' ); ?>
</ul>
</div><!-- archive column -->
<div class="archive-column">
<h4><?php _e( 'Pages', 'author' ); ?></h4>
<ul>
<?php wp_list_pages( 'sort_column=menu_order&title_li=' ); ?>
</ul>
</div><!-- archive column -->
<div class="archive-column">
<h4><?php _e( 'Categories', 'author' ); ?></h4>
<ul>
<?php wp_list_categories( 'orderby=name&title_li=' ); ?>
</ul>
</div><!-- archive column -->
<div class="archive-column">
<h4><?php _e( 'Contributors', 'author' ); ?></h4>
<ul>
<?php wp_list_authors( 'show_fullname=1&optioncount=1&orderby=post_count&order=DESC' ); ?>
</ul>
</div><!-- archive column -->
<div class="archive-column">
<h4><?php _e( 'By Day', 'author' ); ?></h4>
<ul>
<?php wp_get_archives( 'type=daily&limit=25' ); ?>
</ul>
</div><!-- archive column -->
<div class="archive-column">
<h4><?php _e( 'By Month', 'author' ); ?></h4>
<ul>
<?php wp_get_archives( 'type=monthly&limit=12' ); ?>
</ul>
</div><!-- archive column -->
</div><!-- archive -->
</div><!-- post content -->
</div><!-- frame -->
<!-- post meta -->
<?php get_template_part( 'template-meta' ); ?>
</div><!-- box -->
</div><!-- post-->
<?php endwhile; ?>
</div><!-- post wrap -->
<?php else: ?>
</div><!-- content -->
<?php endif; ?>
<!-- end posts -->
</div><!--content-->
<!-- load the sidebar -->
<?php get_sidebar(); ?>
</div><!-- content wrap -->
<!-- load footer -->
<?php get_footer(); ?>