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.

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.

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!

Pin It on Pinterest

Add address