简体   繁体   English

自定义菜单链接说明

[英]Custom Menu Link Descriptions

I am building a custom WordPress theme and need to add descriptions to my custom menu links. 我正在构建一个自定义WordPress主题,并且需要向我的自定义菜单链接添加描述。 According to WordPress, there is a way to do this: 根据WordPress,有一种方法可以做到这一点:

"The description will be displayed in the menu if the current theme supports it." “如果当前主题支持,说明将显示在菜单中。”

Does anyone know how to support this? 有人知道如何支持吗?

Thanks in advance, 提前致谢,

Tim 提姆

Wordpress' documentation on this is misleading. Wordpress的文档对此具有误导性。 It actually took me quite some time to find out how to do this myself. 实际上,我花了一些时间自己找出如何做的方法。 As long as your theme supports menus (meaning, you've Registered a Custom Menu within functions.php or elsewhere), you can add Link Descriptions and other useful information by default. 只要您的主题支持菜单(也就是说,您已经在functions.php或其他地方注册了自定义菜单 ),就可以默认添加链接描述和其他有用的信息。

In order to SEE these options, go to Appearance->Menus and click on Screen Options (up in the top right-hand corner of the screen). 为了查看这些选项,请转到外观->菜单,然后单击屏幕选项(位于屏幕右上角)。 You will be able to enable the options you like under "Show advanced menu properties". 您将能够在“显示高级菜单属性”下启用所需的选项。

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

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