
wordpress 简单按钮
您想创建 WordPress 博客文章或页面的短链接吗? WordPress 短链接对于在电子邮件、Facebook 消息甚至短信中共享非常有用。在 WordPress 4.4 版本之前,这是默认功能。最近,我们的一位读者询问如何在 WordPress 中恢复获取短链接功能。在本教程中,我们将分享如何恢复WordPress中的获取短链接按钮。
您想创建指向 WordPress 博客文章或页面的短链接吗? WordPress 短链接非常适合共享电子邮件、Facebook 消息,甚至短信。在 WordPress 4.4 之前,这是默认功能。最近,我们的一位读者询问如何在 WordPress 中恢复获取短链接功能。在本教程中,我们将分享如何恢复WordPress中的获取短链接按钮。

WordPress中的“获取短链接”按钮是什么? (What is the Get Shortlink Button in WordPress?)
获取短链接按钮是 WordPress 的一项功能,可让您轻松获取 WordPress 博客文章或页面的短链接。它曾经位于帖子编辑屏幕中的永久链接区域旁边。
“获取短链接”按钮是 WordPress 的一项功能,可让您轻松获取 WordPress 博客文章或页面的短链接。它曾经位于帖子编辑屏幕中的永久链接区域旁边。

However if you recently 开始你的博客, then you will not see this feature on your WordPress site because it was removed after WordPress version 4.4.
但是,如果您最近开始博客 ,那么您将不会在WordPress站点上看到此功能,因为该功能在WordPress 4.4版之后已被删除。
我们发现此功能对于轻松获取博客文章的短链接非常有用,如下所示:
我们发现此功能对于轻松获取博客文章的短链接很有用,如下所示:
http://wpbeg.in/2csN1pj
http://wpbeg.in/2csN1pj
如果您想在 WordPress 网站上恢复获取短链接功能,那么您来对地方了。
如果您想在 WordPress 网站上恢复获取短链接功能,那么您来对地方了。
让我们看看如何在 WordPress 中恢复获取短链接按钮。
我们来看看如何恢复WordPress中的“获取短链接”按钮。
方法1:使用WP Bitly插件添加“获取短链接”按钮 (Method 1: Using WP Bitly plugin to Add Get Shortlink Button)
此方法更简单,推荐大多数用户使用。此方法还允许您为您的网站创建自定义品牌短网址。
此方法比较简单,推荐大多数用户使用。此方法还允许您为您的网站创建自定义品牌短 URL。
First thing you need to do is install and activate the WP比特利 plugin. For more details, see our step by step guide on 如何在 WordPress 中安装插件.
您需要做的第一件事是安装并激活WP比特利插件。 有关更多详细信息,请参阅有关如何在 WordPress 中安装插件步指南。
Upon activation, this plugin will automatically add the 获取短链接 button on your post edit screen.
激活后,此插件将自动在您的帖子编辑屏幕上添加“ 做空链接”按钮。

单击此按钮后,它将显示 WordPress 帖子和页面的短链接。此短链接可以在您的电子邮件和消息中共享,以便您的受众可以直接访问该页面。
单击此按钮后,它将显示指向 WordPress 帖子和页面的短链接。短链接可以在您的电子邮件和消息中共享,以便您的受众可以直接访问该页面。

You can also use the WP Bitly plugin to create custom branded shortlinks for your blog posts like we do on WPBeginner. See our step by step guide on 如何在 WordPress 中创建您自己的自定义短网址.
您也可以像在WPBeginner上一样,使用WP Bitly插件为您的博客帖子创建自定义品牌的短链接。 请参阅我们的逐步指南, 了解如何在 WordPress 中创建您自己的自定义短 URL 。
方法2:手动添加获取Shortlink按钮 (Method 2: Manually Adding Get Shortlink Button)
This method requires you to add code to your WordPress files. If you haven’t done this before, then please take a look at our guide on 如何在 WordPress 中复制和粘贴代码.
此方法要求您将代码添加到WordPress文件中。 如果您以前没有做过,请查看我们的指南, 了解如何在 WordPress 中复制和粘贴代码 。
You will need to add the following code to your WordPress theme’s 函数.php 文件 or a 特定于站点的插件:
您将需要在WordPress主题的函数.php 文件或具体的于在网站的插件中添加以下代码:
add_filter( 'get_shortlink', function( $shortlink ) {return $shortlink;} );
This code will add the shortlink filter to display the 获取短链接 button in your WordPress pages and posts.
这段代码将添加短链接过滤器,以在WordPress页面和帖子中显示“ 获得短链接”按钮。

您可以单击此按钮来获取您的帖子或页面的短链接。
您可以单击此按钮获取指向您的帖子或页面的短链接。
We hope this article helped you bring back the Get Shortlink button in WordPress. You may also want to check out our list of the 必须有商业网站的 WordPress 插件.
我们希望本文能帮助您带回WordPress中的“获取快捷链接”按钮。 您可能还需要查看我们的商业网站必须有 WordPress 插件列表。
If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube 频道 WordPress视频教程。 您也可以在推特和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-restore-the-get-shortlink-button-in-wordpress/
wordpress 简单按钮