forked from Alecaddd/Sunset-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
59 lines (37 loc) · 1.54 KB
/
archive.php
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
<?php /*
@package sunsettheme
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<header class="archive-header text-center">
<?php the_archive_title('<h1 class="page-title">', '</h1>'); ?>
</header>
<?php if( is_paged() ): ?>
<div class="container text-center container-load-previous">
<a class="btn-sunset-load sunset-load-more" data-prev="1" data-archive="<?php echo sunset_grab_current_uri(); ?>" data-page="<?php echo sunset_check_paged(1); ?>" data-url="<?php echo admin_url('admin-ajax.php'); ?>">
<span class="sunset-icon sunset-loading"></span>
<span class="text">Load Previous</span>
</a>
</div><!-- .container -->
<?php endif; ?>
<div class="container sunset-posts-container">
<?php
if( have_posts() ):
echo '<div class="page-limit" data-page="' . $_SERVER["REQUEST_URI"] . '">';
while( have_posts() ): the_post();
get_template_part( 'template-parts/content', get_post_format() );
endwhile;
echo '</div>';
endif;
?>
</div><!-- .container -->
<div class="container text-center">
<a class="btn-sunset-load sunset-load-more" data-page="<?php echo sunset_check_paged(1); ?>" data-archive="<?php echo sunset_grab_current_uri(); ?>" data-url="<?php echo admin_url('admin-ajax.php'); ?>">
<span class="sunset-icon sunset-loading"></span>
<span class="text">Load More</span>
</a>
</div><!-- .container -->
</main>
</div><!-- #primary -->
<?php get_footer(); ?>