如何在WordPress中添加到小部件标题的链接

Most WordPress widgets come with an option to set a title for each widget. The widget title is used as a heading for widgets in your sidebar or other widget areas. Recently we showed you how to hide widget title in WordPress. In that post’s comment, one of our users asked us about how they can add a link to widget title to make it clickable. For example, you may have a widget area just to display Google+ “add to circles” widget, and you want to have the title “Add us on Google+” be a link to your Google+ page. In this article we will show you how to add a link to widget titles in WordPress.

大多数WordPress小部件都带有为每个小部件设置标题的选项。 小部件标题用作侧边栏或其他小部件区域中小部件的标题。 最近,我们向您展示了如何在WordPress中隐藏小部件标题 。 在该帖子的评论中,我们的一位用户向我们询问了如何添加到小部件标题的链接以使其可单击。 例如,您可能有一个窗口小部件区域仅用于显示Google+“添加到圈子”窗口小部件 ,而您想要将标题“ 在Google+上添加我们 ”作为指向Google+页面的链接。 在本文中,我们将向您展示如何在WordPress中添加指向小部件标题的链接。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

First thing you need to do is install and activate the Widget Title Links plugin. Upon activation, this plugin adds a Title Link field in all your WordPress widgets.

您需要做的第一件事是安装并激活Widget Title Links插件。 激活后,此插件会在所有WordPress小部件中添加标题链接字段。

Adding link to a widget title

Just add the title of your Widget and then add the URL in the Title Link field. Save settings and preview your site. You will notice that your Widget’s title is now linked to the URL you provided. This method allows you to create clickable widget titles. Here is the preview:

只需添加小部件的标题,然后在“ 标题链接”字段中添加URL。 保存设置并预览您的网站。 您会注意到,小部件的标题现已链接到您提供的URL。 此方法使您可以创建可单击的窗口小部件标题。 这是预览:

Widget Title Links Preview

We hope that you found this guide on how to add links to WordPress widget titles helpful. If you want to learn more about widgets, then we recommend you to read our guide on extending the power of your default WordPress widgets. If you have any questions, suggestions, or feedback, then please leave a comment below.

希望本指南对如何向WordPress小部件标题添加链接的指南有所帮助。 如果您想了解有关小部件的更多信息,那么我们建议您阅读有关扩展默认WordPress小部件功能的指南 。 如果您有任何问题,建议或反馈,请在下面发表评论。

翻译自: https://www.wpbeginner.com/plugins/how-to-add-a-link-to-widget-titles-in-wordpress/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值