This repository was archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtemplate-archives.php
More file actions
executable file
·79 lines (58 loc) · 1.76 KB
/
template-archives.php
File metadata and controls
executable file
·79 lines (58 loc) · 1.76 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
<?php
/**
* Template Name: Archives
* The template for displaying the post archives.
*
* @package Designer
* @link https://themebeans.com/themes/designer
*/
get_header();
// META
$content = $post->post_content;
$page_content_layout = get_post_meta( $post->ID, '_bean_page_content_layout', true );
$page_parallax = get_post_meta( $post->ID, '_bean_page_parallax', true ); ?>
<?php
while ( have_posts() ) :
the_post();
?>
<?php
if ( $page_parallax == 'off' ) {
$page_parallax = 'no-parallax'; }
?>
<?php
if ( has_post_thumbnail() ) {
echo '<div class="entry-media ' . esc_attr( $page_parallax ) . '">';
the_post_thumbnail( 'port-full' );
echo '</div>'; }
?>
<div id="post-<?php the_ID(); ?>" <?php post_class( esc_attr( $page_content_layout ) ); ?>>
<article class="entry-content main-content fadein
<?php
if ( ! has_post_thumbnail() ) {
echo 'no-media'; }
?>
clearfix">
<?php the_content(); ?>
<div class="archives-list">
<h3><span><?php _e( '01. ', 'designer' ); ?></span><?php _e( 'Last 30 Posts', 'designer' ); ?></h3>
<ul>
<?php
$archive_30 = get_posts( 'numberposts=30' );
foreach ( $archive_30 as $post ) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<h3><span><?php _e( '02. ', 'designer' ); ?></span><?php _e( 'Monthly Archives', 'designer' ); ?></h3>
<ul><?php wp_get_archives( 'type=monthly' ); ?></ul>
<h3><span><?php _e( '03. ', 'designer' ); ?></span><?php _e( 'Category Archives ', 'designer' ); ?></h3>
<ul><?php wp_list_categories( 'title_li=' ); ?></ul>
</div><!-- END .archives-list -->
</article>
</div>
<?php
endwhile;
wp_reset_postdata(); // THE LOOP
?>
<?php
get_footer();