<p class="widget" id="diary1">
<h3>随机出现</h3>
<ul>
<?php
$args=array(
'numberposts'=>16,
'category'=>'-9,-12',
'orderby'=>'rand'
);
$rand_posts = get_posts($args);
foreach( $rand_posts as $post ) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</p>
$args=array(
'numberposts'=>16,
'category'=>'-9,-12',
'orderby'=>'rand'
);
<?php $args = array(
'posts_per_page' => 5,
'numberposts' => 5,
'offset' => 0,
'category' => '',
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' => '',
'post_type' => 'post',
'post_mime_type' => '',
'post_parent' => '',
'post_status' => 'publish',
'suppress_filters' => true );
?>
以上就是安达网络工作室关于《wordpress get_posts函数的使用方法 禁止输出指定类别的文章》的一些看法。更多内容请查看本栏目更多内容!
首先简略理解下 wp-Syntax 插件,wp-Syntax 是一个针对wordpress的代码高亮插件,最大的优点是简略易用,兼...
其次要用处是经过该办法, 完成后盾的生成菜枯燥用。 应用该性能之前,必需激活主题3.0+菜单性能。 办法如下...
比方: A 留言了, B 用 @ 回复了 A, 所以 B 的回复可能是这样的: @A How much money do you have? 就是说...
要害字形容:性能 治理 链接 解说 能够 这个 增加 信息 网站 一个 这一次咱们来解说Wordpress链接治理性能...
即便你的博客治理后盾的治理员身份被人破解了,普通他也不会同时破解你的网站空间ftp账号,所以他也更改不了...
本文实例讲述了WordPress后盾地址被改招致无奈登陆后盾的简略处理办法。分享给大家供大家参考,详细如下: ...