• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

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

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags