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

前端之家收集整理的这篇文章主要介绍了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; ?>

原文链接:https://www.f2er.com/wordpress/15459.html

猜你在找的wordpress相关文章