本文整理自网络,侵删。
调用网站最新文章:
代码如下:
<?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; ?>
<?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; ?>
调用随机文章:
代码如下:
<?php
query_posts('showposts=10&orderby=rand'); //showposts=10表示10篇
while(have_posts()): the_post();
?>
<li><a target="_blank"><?php the_title() ?></a></li> //这里可以写成你自己需要的样式
<?php endwhile; ?>
<?php
query_posts('showposts=10&orderby=rand'); //showposts=10表示10篇
while(have_posts()): the_post();
?>
<li><a target="_blank"><?php the_title() ?></a></li> //这里可以写成你自己需要的样式
<?php endwhile; ?>
调用某个分类下的最新文章:
相关阅读 >>
wordpress 相册插件 nextgen-gallery 添加目录将中文转为拼音的解决办法
wordpress wp_head()函数使页面顶部总空白28px
php版本升级到7.x后wordpress的一些修改及wordpress技巧
更多相关阅读请进入《wordpress》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。