我遇到这种情况:在Wordpress博客中,我的主导航持久化类别 . 正在使用 wp_list_categories() 创建导航 .
wp_list_categories()
现在,我想在一个仅由类别构建的导航中的某个位置处将一个链接混合到一个页面 .
任何想法我怎么能做到这一点?
非常感谢!扭伤
使用http://codex.wordpress.org/Function_Reference/wp_list_pages并在菜单中排除您不想要的页面:
<php wp_list_pages(title_li&exclude=X;);?>
其中'X'是您要排除的页面的ID号 . 或使用像Exclude Pages.这样的插件
使用http://codex.wordpress.org/Template_Tags/wp_list_categories执行相同操作以拆分类别列表并将页面列表放在类别菜单中 .
使用Reveal IDs for WP Admin « WordPress Plugins查找页面ID .
1 回答
使用http://codex.wordpress.org/Function_Reference/wp_list_pages并在菜单中排除您不想要的页面:
<php wp_list_pages(title_li&exclude=X;);?>
其中'X'是您要排除的页面的ID号 . 或使用像Exclude Pages.这样的插件
使用http://codex.wordpress.org/Template_Tags/wp_list_categories执行相同操作以拆分类别列表并将页面列表放在类别菜单中 .
使用Reveal IDs for WP Admin « WordPress Plugins查找页面ID .