如何防止在 Wordpress 中单击带有子项的主菜单项?

编程入门 行业动态 更新时间:2024-10-10 02:14:56
本文介绍了如何防止在 Wordpress 中单击带有子项的主菜单项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是我的网站:wake9/blogs/norcal-merced-wakesurfing-competition-2009/.

注意菜单项照片和结果".将鼠标悬停在它上面,您将看到子菜单项.我希望能够点击子菜单项,但主菜单项不应是页面或可点击.我能在菜单上得到这个项目的唯一方法是把它变成一个页面.有没有一种方法可以让菜单项具有内容的子菜单项,但实际的菜单项不可点击?我正在考虑使用 JQuery 删除锚标记,但这是一个真正的黑客,我想知道是否有更简单的方法.

Notice the menu item "Photos and Results". Hover over it and you will see sub menu items. I want to be able to click on the sub-menu items but the main menu item shouldn't be a page or be clickable. The only way i could get this item on the menu was to make it a page. Is there a way to just have a menu item that has sub menu items to content, but the actual menu item isn't clickable? I was thinking about using JQuery to remove the anchor tag, but that is a real hack and I want to know if there is an easier way.

提前致谢!

推荐答案

一种选择是使用 页面链接到 插件并将主链接设置为 '#' .我试过这个,它在我的博客中有效.

One option would be to use Page Links to plugin and set the main link as '#' . I tried this and it works in my blog.

更多推荐

如何防止在 Wordpress 中单击带有子项的主菜单项?

本文发布于:2023-11-28 10:36:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642050.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:主菜   单项   单击   如何防止   Wordpress

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!