How To Expire A Custom Function Automatically On A Future Date

This code uses 2 PHP functions which return false after the date you set has passed.

Simply set the time in the code and your function will return false after that date has expired.

You can use this custom function in your child themes functions file to display text, banner HTML or a widget which no longer displays after a future date has passed.

Learn more about the PHP function strtotime on php.net

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.