-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy patharchive-note.php
50 lines (50 loc) · 1.76 KB
/
archive-note.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
<?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
$limit = get_option('posts_per_page');$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('post_type=note&post_status=publish&paged=' . $paged);
if (have_posts()) : while (have_posts()) : 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;
?>
</ul>
</div>
<?php require 'inc/ajax/ajax-note-page.php'; ?>
</article>
<?php get_aside(); ?>
</div>
</main>
</div>
<?php get_foot(); ?>