wordpress自定义循环列表的php代码

 
<?php $epaged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$temp = $wp_query;
$wp_query = null;
?>
<?php $wp_query = new WP_Query('category_name=portfolio&tag=web&showposts=5&paged=' . $epaged);?>
<?php if ($wp_query->have_posts()) : ?>
<section class="itemBlocks">
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<article class="iBlock">
<time datetime="<?php the_time('Y-m-d') ?>" class="fs-14" pubdate><?php the_time('F jS, Y') ?></time>
<h1 class="fs-14 color-dark">
<a rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="lnk-item">
<?php the_title(); ?>
</a>
</h1>
<section class="story hidden">
<?php the_content(); ?>
</secion>
</article>
<?php endwhile;?>
<p class="postsPaging">
<?php
next_posts_link( __( '&larr; Older posts', 'twentyten' ) );
previous_posts_link( __( 'Newer posts &rarr;', 'twentyten' ) );
$wp_query = null; $wp_query = $temp;
?>
</p>
</section>
<?php
endif;
?>

以上就是安达网络工作室关于《wordpress自定义循环列表的php代码》的一些看法。更多内容请查看本栏目更多内容!

本文相关话题: wordpress 自定义 循环列表
版权声明:本文为 安达网络工作室 转载文章,如有侵权请联系我们及时删除。
相关文章
在wordpress可视化编辑器中输出带缩进的代码

在WordPress中,咱们发如今写文章时,可视化模式下会对html代码进行清算,例如对<>等符号转化为html实体,对...

WordPress文章摘要小记

其实我集体并不是很喜爱这种摘要的显示形式,然而这个办法用起来比拟不便而已。   WordPress是有摘要性能...

WordPress 的次要特点

要害字形容:特点 次要 WordPress 能够 链接 公布 文章 博客 进行 WordPress 的次要特点。WordPress 有很多...

WordPress中使主题支持小工具以及增加插件启用函数

让主题支持小工具 WordPress 的小工具(widget)是一大特征,它让用户自在拖动组合内容,而且任何插件和主题...

如何将WordPress博客订阅到QQ邮箱详细该怎样操作

1、登录QQ邮箱,点击右下角&ldquo;浏览空间&rdquo;,进入浏览空间。 2、进入浏览空间后,点击页面右上角&ld...

详解WordPress中调用评论模板和循环输入评论的PHP函数

comments_template comments_template 函数是一个调用评论模板的函数,应用起来很简略,与get_header()等函...

需求提交

客服服务

亿鸽在线客服系统