我的Wordpress网站使用自定义首页(home.php
). 博客页面使用模板(blog.php
).
然而,当我访问博客页面时,导航栏不会突出显示当前页面。这是因为.current-menu-item
(和班级.current_page_item
) 导航中缺少li
. 当我访问使用默认页面模板的所有其他页面时,该类被正确包含。
以下是博客页面的模板:
<?php
/*
Template Name: Blog
*/
// Which page of the blog are we on?
$paged = get_query_var(\'paged\');
query_posts(\'cat=-0&paged=\'.$paged);
// make posts print only the first part with a link to rest of the post.
global $more;
$more = 0;
//load index to show blog
load_template(TEMPLATEPATH . \'/index.php\');
?>
我注意到如果我取消对query_posts
然后导航栏样式正常工作,但页面留空。有什么想法吗?