如何在WordPress的即时贴中添加过期日期

Do you use Sticky posts in WordPress to highlight your featured posts on your blog? If so, then you probably know that each sticky post has to be manually turned off. Recently one of our users asked us for an easier way to automatically remove sticky from sticky posts. In this article, we will show you how to add an expiration date to sticky posts in WordPress.

您是否使用WordPress中的粘性帖子在博客上突出显示您的特色帖子? 如果是这样,那么您可能知道每个粘性帖子都必须手动关闭。 最近,我们的一位用户要求我们提供一种更简便的方法,以自动从粘性帖子中删除粘性内容。 在本文中,我们将向您展示如何在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 Expire Sticky Posts plugin. Once activated, this plugin works out of the box and does not have any separate settings page.

您需要做的第一件事是安装并激活Expire Sticky Posts插件。 激活后,此插件即可使用,并且没有任何单独的设置页面。

Now if you want to add an expiration date to a sticky post, all you have to do is go the edit screen for any post or create a new post.

现在,如果您要向即时贴添加过期日期,您要做的就是进入任何帖子的编辑屏幕或创建一个新帖子。

Under the Publish metabox, you will find a new setting labeled ‘Sticky Expires’. Clicking on the Edit link next to it will display a date field.

在“ 发布”元框下,您将找到一个名为“ Sticky Expires”的新设置。 单击旁边的“编辑”链接将显示一个日期字段。

Sticky Post Expiration Setting

Simply select the date when you want the sticky post to become a normal post and press the update button.

只需选择要使便笺成为普通帖子的日期,然后按更新按钮。

That’s all, your sticky post will automatically expire on the given date, and it will be treated like any other regular post after that date.

就是这样,您的粘性帖子将在给定日期自动过期,并且在该日期之后,它将像其他任何常规帖子一样被对待。

We hope this article helped you add an expiration date to sticky posts in WordPress. You may also want to take a look at our tutorials on how to add sticky posts for categories and custom post type archives.

我们希望本文能帮助您为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视频教程。 您也可以在TwitterGoogle+上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-add-an-expiration-date-to-sticky-posts-in-wordpress/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值