Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Set Expire Date for Widgets in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Set Expire Date for Widgets in WordPress

Widgets are the easiest way to add custom items to your WordPress sidebars or widget-ready areas. You can customize widget display with Widget Logic, hide widget titles, and you can even display widgets in post or page content. WordPress Widgets are just as customizable, as WordPress itself. In this article, we will show you how to set an expire date for widgets in WordPress.

When You Need To Set an Expire Date for Widgets?

Sometimes you may want to run a promotional campaign on your website, a campaign that expires at a given time. By setting up an expiration date for the widget, you can hide it from the users when the campaign is over. There can be many other uses, like for example hiding ads when their time slot is over, or hiding seasonal widgets during holidays.

Video Tutorial

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

To set up expire date for widgets in WordPress all you need to do is install and activate the Dynamic Widgets plugin. After activation, you need to go to Appearance » Dynamic Widgets area. There you will see all your currently displayed widgets in their respective sidebars.

Dynamic Widgets Screen

To set an expiration date for a widget, simply click on the edit link below the widget title. This will open the widget in the Dynamic Widget’s widget editor. Now you need to click on the date option and select No under ‘Show widget always?’ option. Below it you can set a display duration for the widget.

Setting up an expire date for a Widget in WordPress

The widget will expire when it reaches the end date. Upon expiration your widget will still be available under admin section, but it will not be displayed publicly on your site.

Dynamic Widgets can also be used to set other conditional rules on widget display. For example, you can display a widget on certain sections of your website, or you can set to display a widget on certain days of the week, month, etc.

We hope this article helped you gain more control over WordPress widgets. What other features would you like to see in WordPress widgets to make them more dynamic and powerful?

Let us know by leaving a comment below or join us on Twitter.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Osmel says:

    Does the date option work in a local enviroment?. I had been using other options of dynamic widget and worked perfectly but date option did´t work, at least in my testing local site

  2. Laurent says:

    Thanks for this tip! Very very useful, probably for a lots of people. More than 300,000 downloads for this plugin!

  3. adolf witzeling says:

    Great tip. Perfect for running time-sensitive promos.

  4. Lois Dupre says:

    Well that was just too easy! Just what I needed for my affiliate links that only run for a certain length of time.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.