wordpress简捷按钮_如何还原WordPress中的获取快捷链接按钮

wordpress简捷按钮

Do you want to create a shortlink of your WordPress blog posts or pages? WordPress shortlinks are useful for sharing in your emails, facebook messages, or even text messages. It was a default feature until WordPress version 4.4. Recently, one of our readers asked how to bring back the get shortlink feature in WordPress. In this tutorial, we will share how to restore the get shortlink button in WordPress.

您要创建WordPress博客文章或页面的短链接吗? WordPress短链接对于共享电子邮件,Facebook消息甚至是文本消息非常有用。 在WordPress 4.4之前,它是默认功能。 最近,我们的一位读者询问如何带回WordPress中的get shortlink功能。 在本教程中,我们将分享如何在WordPress中还原get shortlink按钮。

How to Get the Get Shortlink Button in WordPress
WordPress中的“获取短链接”按钮是什么? (What is the Get Shortlink Button in WordPress?)

Get Shortlink button is a WordPress feature that allows you to easily get a short link of your WordPress blog post or page. It used to be located right next to the permalink area in the post edit screen.

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

Get Shortlink Button

However if you recently started your blog, then you will not see this feature on your WordPress site because it was removed after WordPress version 4.4.

但是,如果您最近启动了Blog ,那么您将不会在WordPress站点上看到此功能,因为该功能在WordPress 4.4版之后已被删除。

We find this feature to be quite useful for easily getting shortlinks for our blog posts that look like this:

我们发现此功能对于轻松获取如下所示的博客文章的短链接非常有用:

http://wpbeg.in/2csN1pj

http://wpbeg.in/2csN1pj

If you want to bring back the get shortlink feature on your WordPress site, then you’re in the right place.

如果您想在WordPress网站上恢复get shortlink功能,那么您来对地方了。

Let’s take a look at how to bring back the get shortlink button back in WordPress.

让我们看一下如何在WordPress中恢复“获取短链接”按钮。

方法1:使用WP Bitly插件添加“获取短链接”按钮 (Method 1: Using WP Bitly plugin to Add Get Shortlink Button)

This method is easier and recommended for most users. This method also allows you to create custom branded short URLs for your website.

此方法更简单,建议大多数用户使用。 此方法还允许您为网站创建自定义品牌的短URL。

First thing you need to do is install and activate the WP Bitly plugin. For more details, see our step by step guide on how to install a plugin in WordPress.

您需要做的第一件事是安装并激活WP Bitly插件。 有关更多详细信息,请参阅有关如何在WordPress中安装插件的分步指南。

Upon activation, this plugin will automatically add the Get Shortlink button on your post edit screen.

激活后,此插件将自动在您的帖子编辑屏幕上添加“ 获取短链接”按钮。

Get Shortlink Button

Once you click on this button, it will show you the shortlink for your WordPress posts and pages. This shortlink can be shared in your emails and messages, so your audience can reach directly to the page.

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

Page Shortlink

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 how to create your own customized short url in WordPress.

您也可以像在WPBeginner上一样,使用WP Bitly插件为您的博客帖子创建自定义品牌的短链接。 请参阅我们的逐步指南, 了解如何在WordPress中创建自己的自定义短网址

方法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 how to copy and paste code in WordPress.

此方法要求您将代码添加到WordPress文件中。 如果您以前没有做过,请查看我们的指南, 了解如何在WordPress中复制和粘贴代码

You will need to add the following code to your WordPress theme’s functions.php file or a site-specific plugin:

您将需要在WordPress主题的functions.php文件特定站点的插件中添加以下代码:



add_filter( 'get_shortlink', function( $shortlink ) {return $shortlink;} );


This code will add the shortlink filter to display the Get Shortlink button in your WordPress pages and posts.

这段代码将添加短链接过滤器,以在WordPress页面和帖子中显示“ 获取短链接”按钮。

Get Shortlink Button

You can click on this button to get the shortlink for your post or page.

您可以单击此按钮以获取您的帖子或页面的短链接。

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 must have WordPress plugins for business websites.

我们希望本文能帮助您带回WordPress中的“获取快捷链接”按钮。 您可能还需要查看我们的必须具有用于商务网站的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 Facebook.

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

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-restore-the-get-shortlink-button-in-wordpress/

wordpress简捷按钮

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值