Repository navigation
Expand file tree
/
Copy pathindex.php
More file actions
67 lines (53 loc) · 1.52 KB
/
Copy pathindex.php
File metadata and controls
67 lines (53 loc) · 1.52 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
<?php
/**
* The main template file
*
* @package PinterHVN_Theme
* @since 1.0.0
*/
get_header();
?>
<main id="primary" class="site-main">
<div class="container">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="archive-description">', '</div>' );
?>
</header>
<div class="pinterhvn-grid" id="assets-grid">
<div class="grid-sizer"></div>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'asset-card' );
endwhile;
?>
</div>
<?php
// Pagination
pinterhvn_pagination();
?>
<!-- Load More Button (for infinite scroll) -->
<div class="load-more-wrapper text-center mt-4" style="display: none;">
<button class="btn btn-primary" id="load-more-assets">
<?php _e( 'Tải thêm', 'pinterhvn-theme' ); ?>
</button>
<div class="spinner" style="display: none;"></div>
</div>
<?php else : ?>
<div class="no-results">
<h2><?php _e( 'Nothing Found', 'pinterhvn-theme' ); ?></h2>
<p><?php _e( 'No assets found. Try uploading some!', 'pinterhvn-theme' ); ?></p>
<?php if ( is_user_logged_in() && current_user_can( 'edit_posts' ) ) : ?>
<a href="<?php echo esc_url( home_url( '/upload-asset/' ) ); ?>" class="btn btn-primary">
<?php _e( 'Upload Asset', 'pinterhvn-theme' ); ?>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</main>
<?php
get_footer();