简体   繁体   English

WordPress:带有类别导航的混合页面

[英]Wordpress: Mingle page with category navigation

I'm having this situation: 我遇到这种情况:
In a Wordpress blog I have my main navigation persisting of categories. 在Wordpress博客中,我的主要导航持续显示类别。 The navigation is being created with wp_list_categories() . 正在使用wp_list_categories()创建导航。

Now I'd like to mingle just one link to a page at a certain position within this navigation built of only categories. 现在,我只想在此仅由类别构成的导航中,将指向页面的一个链接混合在一起。

Any ideas how I could accomplish this? 有什么想法我可以做到这一点吗?

Thanks a lot! 非常感谢!
sprain 扭伤

Use http://codex.wordpress.org/Function_Reference/wp_list_pages and exclude the pages you don't want in the menu: 使用http://codex.wordpress.org/Function_Reference/wp_list_pages,并在菜单中排除不需要的页面:

<php wp_list_pages(title_li&exclude=X;);?>

where 'X' is the id number of the page you want to exclude. 其中“ X”是您要排除的页面的ID号。 Or use a plugin like Exclude Pages. 或者使用“ 排除页面”之类的插件

Do the same with http://codex.wordpress.org/Template_Tags/wp_list_categories to split the category listings and put the page listings within the category menu. http://codex.wordpress.org/Template_Tags/wp_list_categories进行相同操作,以拆分类别列表,并将页面列表放入类别菜单。

Use Reveal IDs for WP Admin « WordPress Plugins to find page IDs. 使用WP管理员«WordPress插件的显示ID来查找页面ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM