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开发中用于获取分类及子页面的函数用法

get_category get_category 可能咱们平常接触的不多,但却是很有用,网上这个函数引见的貌似不多,所以明天...

wordpress固定链接翻译插件 主动将题目翻译成英文

wpslugtranslate插件引见: 经过该插件,能够让wordpress中文博客的博主应用/%postname%.html方式的固定链接...

解说WordPress中用于获取评论模板和搜寻表单的PHP函数

comments_template()(获取评论模板) comments_template() 函数用来获取评论模板,普通只能用在文章或许页...

WordPress中注册菜单与调用菜单的办法详解

register_nav_menus()(注册菜单) register_nav_menus() 函数用来注册一个菜单,菜单指的是 WordPress 3.0...

wordpress暴门路 影响一切版本

缺点文件/{Path}/wp-includes/registration-functions.php 要害代码: &mdash;-> <?php /** * Deprecated. N...

wordpress回复评论文字的修正办法

  WordPress主题教程之修正wordpress回复评论文字办法,首选需求建设个自定义的评论模板,而后经过调用此...

需求提交

客服服务

亿鸽在线客服系统