Wordpress自定义循环系统列表php代码,应用wordpress的朋友必须自定义列表,朋友可以参考。
复制代码代码以下:
<?php$epaged=(get_query_var('paged'))?get_query_var('paged'):1;
$temp=$wp_query;
$wp_query=null;
?>
<?php$wp_query=newWP_Query('category_name=portfolio&tag=web&showposts=5&paged='.$epaged);?>
<?phpif($wp_query->have_posts()):?>
<sectionclass="itemBlocks">
<?phpwhile($wp_query->have_posts()):$wp_query->the_post();?>
<articleclass="iBlock">
<timedatetime="<?phpthe_time('Y-m-d')?>"class="fs-14"pubdate><?phpthe_time('FjS,Y')?></time>
<h1class="fs-14color-dark">
<arel="bookmark"title="PermanentLinkto<?phpthe_title_attribute();?>"class="lnk-item">
<?phpthe_title();?>
</a>
</h1>
<sectionclass="storyhidden">
<?phpthe_content();?>
</secion>
</article>
<?phpendwhile;?>
<divclass="postsPaging">
<?php
next_posts_link(__('←Olderposts','twentyten'));
previous_posts_link(__('Newerposts→','twentyten'));
$wp_query=null;$wp_query=$temp;
?>
</div>
</section>
<?php
endif;
?>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)