你如何才能从一个特定的类别中获得最新的帖子,并将它们与作者的图片联系起来。所有作者都在WordPress上签名为作者,他们都有个人资料图片。实际上,它代表的是像这样的圆柱。

系统必须先得到最新的1,然后第二和第三是这样.
发布于 2018-11-14 18:42:02
你可以试试这样的方法:
12, 'post_type' => 'post' );
$postslist = get_posts( $args );
foreach ($postslist as $post) :
setup_postdata($post);
?> 在示例中,类别id设置为12 -只需将其替换为要使用的类别的id。更多信息:如何循环浏览帖子:https://developer.wordpress.org/reference/functions/get_帖子/#用户-投稿-备注如何获得作者名称:https://codex.wordpress.org/Function_参考[参考]_作者如何获得作者图像:https://codex.wordpress.org/Function_参考/获取_阿凡达
https://wordpress.stackexchange.com/questions/318848
复制相似问题