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 CMS性能的8个插件分享

NextGen Gallery 最好的图片相册插件。弱小的支持,稳固,更新频繁,收费。WP内置的相册性能也是OK的,不过...

WordPress完成主动回绝渣滓评论的办法

很多WordPress站长都常常遭到渣滓评论的滋扰,针对这种状况,采纳上面的代码可能会对你有所协助。将以下代码...

WordPress 完成简略的企业网站

Berita是一个专为此类需要设计的收费theme。较之于同类产品,它同时为了添加定制化水平还革新了wp零碎,应用...

为Wordpress博客增加MP3播放器

首先到Flash MP3 Player 的主页上下载该顺序。解紧缩之后,将 mp3player.swf 和 ufo.js 两个文件放到效劳器...

WordPress 链接跳转插件

这款插件称号叫Pretty Link Lite,插件主页:http://wordpress.org/extend/plugins/pretty-link/,也能够在...

wordpress正当利用wp-config.php文件小性能

这里有几个经过往wp-config.php中增加代码完成相干性能的技巧分享给大家。 1,去掉WordPress的历史修订版本...

需求提交

客服服务