调用网站**文章:
<?php
query_posts('showposts=10&orderby=new'); //showposts=10示意10篇
while(have_posts()): the_post();
?>
<li><a href="<?php the_permalink(); ?>"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 href="<?php the_permalink(); ?>"target="_blank"><?php the_title() ?></a></li> //这里能够写成你本人需求的款式
<?php endwhile; ?>
调用某个分类下的**文章:
<?php
query_posts('showposts=10&cat=1'); //cat=1为调用ID为1的分类下文章
while(have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
扫除某个分类下的文章:
<?php
query_posts('showposts=10&cat=-1'); //cat=-1为扫除ID为1的分类下文章
while(have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
以上就是安达网络工作室关于《wordpress调用特定文章列表的技巧分享》的一些看法。更多内容请查看本栏目更多内容!
本文实例讲述了wordpress晋级后明码正确后盾无奈登陆的处理办法。分享给大家供大家参考。详细剖析如下: 明...
以下代码来自网络,未经测试,操作数据库有危险,请事前备份 !为一切文章和页面增加自定义字段 这段代码能...
缺点文件/{Path}/wp-includes/registration-functions.php 要害代码: —-> <?php /** * Deprecated. N...
要害字形容:设置 后盾 进行 如何 这里 Wordpress 选项 能够 网站 你曾经阅读了这个 Wordpress 架设的站点...
WordPress改换空间后 需求调整的几个中央? 1.数据库衔接配置文件 wp-config.php 2.查看.htaccess文件,并修...
如在 Nicky 的博客中, 我发现了下图中的搜寻栏. 在搜寻栏中增加这样的提醒信息, 能够疏导访客对网站进行搜...