0
我想在wordpress中制作我的页面,显示类别。我已经想通了如何显示我想要的类别,查询DB
这样WordPress的页面导航栏
<?php if (have_posts()) : ?>
<?php
query_posts('cat=7');
?>
问题是,当我把导航栏冲浪的网页,这是行不通的......它显示永诺一号页...
这是我对整个页面的代码。我用Index.php
作为基础。
<?php /* Template Name: Page4 */ ?>
<?php get_header(); ?>
<div class="container_16 clearfix">
<div class="grid_16 grid_content_sidebar">
<div class="grid_11 alpha">
<div id="content">
<?php get_template_part('loop-meta'); ?>
<?php if (have_posts()) : ?>
<?php
query_posts('cat=7');
?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('content'); ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part('loop-error'); ?>
<?php endif; ?>
<?php infinity_loop_nav(); ?>
</div> <!-- end #content -->
</div> <!-- end .grid_10 -->
<?php get_sidebar(); ?>
</div> <!-- end .grid_16 -->
</div> <!-- end .container_16 -->
<?php get_footer(); ?>
我正在使用Infinity template
。你能帮忙弄清楚导航栏有什么问题,或者是另一种方法来做到这一点?