wordpress调用特定文章列表的技巧分享


本文整理自网络,侵删。

调用网站最新文章:


代码如下:

<?php
query_posts('showposts=10&orderby=new'); //showposts=10表示10篇
while(have_posts()): the_post();
?>
<li><a target="_blank"><?php the_title() ?></a></li> //这里可以写成你自己需要的样式
<?php endwhile; ?>

调用随机文章:


打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...