微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

<div class="msgborder" id="PHPcode17"> <?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"> <h1 class="fs-14 color-dark"> <a rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="lnk-item"> <?php the_title(); ?> <section class="story hidden"> <?php the_content(); ?> <?php endwhile;?> <div class="postsPaging"> <?php next_posts_link( ( '&larr; Older posts','twentyten' ) ); previous_posts_link( ( 'Newer posts &rarr;','twentyten' ) ); $wp_query = null; $wp_query = $temp; ?>

<?php endif; ?>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐