<?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( __( '← Older posts', 'twentyten' ) );
previous_posts_link( __( 'Newer posts →', 'twentyten' ) );
$wp_query = null; $wp_query = $temp;
?>
</p>
</section>
<?php
endif;
?>
以上就是安达网络工作室关于《wordpress自定义循环列表的php代码》的一些看法。更多内容请查看本栏目更多内容!
get_category get_category 可能咱们平常接触的不多,但却是很有用,网上这个函数引见的貌似不多,所以明天...
wpslugtranslate插件引见: 经过该插件,能够让wordpress中文博客的博主应用/%postname%.html方式的固定链接...
comments_template()(获取评论模板) comments_template() 函数用来获取评论模板,普通只能用在文章或许页...
register_nav_menus()(注册菜单) register_nav_menus() 函数用来注册一个菜单,菜单指的是 WordPress 3.0...
缺点文件/{Path}/wp-includes/registration-functions.php 要害代码: —-> <?php /** * Deprecated. N...
WordPress主题教程之修正wordpress回复评论文字办法,首选需求建设个自定义的评论模板,而后经过调用此...