wordpress - 如何使没有父页面的页面出现在子导航菜单中

发布于 2024-08-17 07:01:57 字数 307 浏览 1 评论 0原文

我有一个带有主页父级的页面(无父级),因此它出现在网站的主导航中。但是,我还想通过下拉菜单上的选项之一访问此页面。如果我将父级设置为该导航页面,它会出现在下拉列表中,但随后会从主导航列表中消失。例如:

主导航:

狗、猫、鸟、鱼、

猫的子导航:

暹罗 虎斑猫 鱼

我希望鱼出现在主导航和“猫”子导航中。如何??

这是我当前显示列表的方式:

wp_list_pages('title_li=&depth=2&exclude=12,342')

I have a page with a Parent of Main Page (no parent), so that it appears in the main navigation of the site. However, I also want to get to this page through one of the options on a drop-down menu. If I set the parent to that Nav page, it appears in the drop-down but then disappears from the main nav list. For example:

Main Nav:

Dogs Cats Birds Fish

Sub-Nav for Cats:

Siamese
Tabby
Fish

I want Fish to appear in both the main nav and the "Cats" subnav. How??

Here is how I'm currently displaying the list:

wp_list_pages('title_li=&depth=2&exclude=12,342')

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

写下不归期 2024-08-24 07:01:57

您可以尝试 wp_list_pages 的“include”参数,看看会发生什么。如果这没有帮助,您可能需要在 wp_list_pages 手动调用后添加一个链接,并将原始链接保留在子菜单中。

You could try the 'include' parameter for wp_list_pages, see what happens. If that does not help you will probably have to add a link after the wp_list_pages call manually and keep the original in the submenu.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文