This plugin retrieves one or more random post/page or both of them from your WordPress installation
此插件从您的WordPress安装中检索一个或多个随机帖子/页面或两者都
Arguments:
参数:
from (string)
来自(string)
– show only posts, or pages, or both
–仅显示帖子或页面,或仅显示两者
– possible values: post |
–可能的值:post |
page
页面
numberposts (integer)
数字帖子(整数)
– number of posts/pages to return
–要返回的帖子/页面数
categories (integers, separated by commas)
类别(整数,用逗号分隔)
– limits returned posts to posts filed under categories found in arguments
–将返回的帖子限制为在自变量中找到的类别下提交的帖子
exclude (integers, separated by commas)
排除(整数,以逗号分隔)
– limits returned posts to posts NOT filed under categories found in arguments
–将返回的帖子限制为未归入自变量类别中的帖子 p>
Sample Code: 示例代码: <?php
$myposts = contentmixx( 'from=post&numberposts=2&categories=8' );
$ myposts = contentmixx('from = post&numberposts = 2&categories = 8');
foreach( $myposts as $post ) {
foreach($ myposts as $ post){
setup_postdata( $post );
setup_postdata($ post);
?>
?>
-EOF-
AI助手支持GPT4.0