首页 > 编程知识 正文

友情链接加nofollow_如何在WordPress导航菜单中添加Nofollow链接

时间:2023-05-04 02:09:11 阅读:250986 作者:2924

友情链接加nofollow

Many site owners prefer to add a nofollow tag to all external links. Adding a nofollow attribute to links in WordPress is extremely simple. However, it is not as clear for navigation menus. In this article, we will show you how to add nofollow links in WordPress navigation menus.

许多网站所有者倾向于将nofollow标记添加到所有外部链接。 向 WordPress中的链接添加nofollow属性非常简单。 但是,对于导航菜单尚不清楚。 在本文中,我们将向您展示如何在WordPress导航菜单中添加nofollow链接。

影片教学 (Video Tutorial)

演示地址

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

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

First start by adding the external link to your WordPress navigation menu just like you would add any custom link.

首先,将外部链接添加到WordPress导航菜单中,就像添加任何自定义链接一样。

Simply visit Appearance » Menus and click on the link tab. Enter the URL and link text and then click on add to menu button.

只需访问外观»菜单 ,然后单击链接选项卡。 输入URL和链接文本,然后单击“添加到菜单”按钮。

The external link you added will now appear in the Menu Structure column. You need to click on the downward arrow to expand the menu item. Like this:

您添加的外部链接现在将出现在“ 菜单结构”列中。 您需要单击向下箭头以展开菜单项。 像这样:

Next, click on the Screen Options button at the top right corner of the screen and check the boxes next to Link Relationship (XFN) and Link Target options.

接下来,单击屏幕右上角的“ 屏幕选项”按钮,然后选中“ 链接关系”(XFN)和“ 链接目标”选项旁边的框。

Now scroll back down to your expanded menu item, and you will notice two new options. Link Relationship and Open link in a new window/tab. You need to enter nofollow in the link relationship option. You can also check the open link in new window/tab option if you want.

现在向下滚动到展开的菜单项,您会注意到两个新选项。 链接关系和新窗口/选项卡中的打开链接。 您需要在链接关系选项中输入nofollow 。 如果需要,您还可以检查在新窗口/选项卡中的打开链接选项。

Lastly, click on the Save Menu button to store your changes.

最后,单击“ 保存菜单”按钮以存储您的更改。

That’s all, you can now preview your site.

就是这样,您现在可以预览您的网站。

To make sure that a nofollow attribute is added to your link, you can take the mouse to the external link, right click and select inspect element. Your browser window will split into two. In the bottom window you will be able to see the HTML source for your link. It will display the nofollow attribute with your link.

为确保将nofollow属性添加到链接,可以将鼠标移至外部链接,右键单击并选择检查元素。 您的浏览器窗口将拆分为两个。 在底部窗口中,您将能够看到链接HTML源。 它将显示带有链接的nofollow属性。

We hope this article helped you learn how to add nofollow links in WordPress navigation menus. You may also like our tutorial on how to add image icons to navigation menus in WordPress.

我们希望本文能帮助您学习如何在WordPress导航菜单中添加nofollow链接。 您可能还喜欢我们的教程,该教程介绍了如何在WordPress的导航菜单中添加图像图标 。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Google+上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-add-nofollow-links-in-wordpress-navigation-menus/

友情链接加nofollow

Vue3实现刷新页面局部内容的示例代码

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。