我可以使用 TwentyTen 主题使导航菜单上的父页面标签在 Wordpress 中不可单击吗?

发布于 2024-12-17 05:12:11 字数 283 浏览 3 评论 0原文

我想使用其中一个页面创建一个 2 级层次结构。

我有一个 5 页的网站,而 page2 恰好有 page2.1 和 page 2.2

因此,在导航中(使用 TwentyTen 主题),当我将鼠标悬停在 page2 标签上时,我能够得到page2.1 和 2.2 下拉菜单将自动出现。

问题在于 Wordpress 和 TwentyTen 生成可点击的 page2 标签。我希望 page2 标签仅充当 2.1 和 2.2 导航项的导航标题,因为 page2 没有内容。

如何使其不可点击?

I want to create a 2 level hierarchy using one of the pages.

I have a 5 page web site and page2 happens to have page2.1 and page 2.2

And as a result, in the navigation, (using TwentyTen theme), when I hover the mouse over the page2 label, I've been able to get the page2.1 and 2.2 dropdowns to appear automatically.

The problem is that Wordpress and TwentyTen generate a clickable page2 label. I want the page2 label to act only as a navigational header for the 2.1 and 2.2 nav items as there is no content for page2.

How do I make it unclickable?

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

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

发布评论

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

评论(1

依 靠 2024-12-24 05:12:11

使用不带链接的自定义菜单项或使用重定向插件(例如简单 301 重定向),以便在有人点击该页面时将该页面定向到 2.1。

Use a custom menu item with no link or use a redirect plugin like Simple 301 Redirect to just direct that page to 2.1 if someone clicks on it.

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