-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive-note.php
More file actions
56 lines (56 loc) · 1.93 KB
/
archive-note.php
File metadata and controls
56 lines (56 loc) · 1.93 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
<?php get_head(); ?>
<div class="container note">
<?php get_header(); ?>
<script>
$('header .menu ul li.note').addClass('current-menu-item');
</script>
<main>
<?php get_nav(); ?>
<div class="content">
<article>
<h2>说说 <span>Notes.</span></h2>
<div class="note-page">
<ul>
<?php
$args = array(
'post_type' => 'note',
'post_status' => 'publish',
'paged' => $paged,
'posts_per_page' => get_option('posts_per_page')
);
$notes_query = new WP_Query($args);
if ($notes_query->have_posts()) : while ($notes_query->have_posts()) : $notes_query->the_post();
?>
<li>
<div class="top">
<div class="left">
<?php the_avatar_author(); ?>
</div>
<div class="right">
<div class="note-author"><?php echo get_user_role(1)->display_name; ?></div>
<div class="note-date"><?php echo get_the_date(); ?> <?php the_time(); ?></div>
</div>
</div>
<div class="center">
<div class="notes-content">
<?php the_content(); ?>
</div>
</div>
<div class="bottom">
<a href="<?php the_permalink(); ?>"><i class="iconfont icon-message-square"></i>查看原文</a>
</div>
</li>
<?php
endwhile;
endif;
wp_reset_postdata();
?>
</ul>
</div>
<?php require 'inc/ajax/ajax-note-page.php'; ?>
</article>
<?php get_aside(); ?>
</div>
</main>
</div>
<?php get_foot(); ?>