-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsidebar.php
37 lines (36 loc) · 1.25 KB
/
sidebar.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
<div class="column-head"><a href="#"><b>政见精选</b></a></div>
<?php
/*
global $authorid_array;
global $issue_array;
global $quarter_array;
$postslist = get_posts( 'numberposts=6&orderby=rand' );
foreach ($postslist as $post) {
setup_postdata($post);
echo '<div class="article-select-first">
<p class="select-head"><a href="'.get_permalink().'">'.get_the_title().'</a></p>
<p class="select-abstract">'.get_excerpt('70').'</p>
</div>';
}
*/
/*
$sticky = get_option( 'sticky_posts' );
//var_dump($sticky);
if ( !empty($sticky) ) {
$postslist = get_posts( array( 'post__in' => $sticky, 'ignore_sticky_posts' => 1, 'orderby' => 'rand', 'posts_per_page'=>6 ) );
foreach ($postslist as $post) {
setup_postdata($post);
echo '<div class="article-select-first">
<p class="select-head"><a href="'.get_permalink().'">'.get_the_title().'</a></p>
<p class="select-abstract">'.get_excerpt('70').'</p>
</div>';
}
}
*/
for ($i=0; $i<=5; $i++) {
echo '<div class="article-select">
<p class="select-head"><a href="'.get_option("cnpolitics_recommend_link_".$i).'">'.get_option("cnpolitics_recommend_title_".$i).'</a></p>
<p class="select-abstract">'.get_option("cnpolitics_recommend_content_".$i).'</p>
</div>';
}
?>