Skip to content

Instantly share code, notes, and snippets.

@zoerooney
Last active December 17, 2015 11:29
Show Gist options
  • Save zoerooney/5602716 to your computer and use it in GitHub Desktop.
Save zoerooney/5602716 to your computer and use it in GitHub Desktop.
Rolling lead time display using WordPress. Tutorial: http://zoerooney.com/blog/tutorials/add-a-rolling-date-in-wordpress/
<?php
// create a variable, use it to get the lead time digit from an ACF custom field
$lead_time = get_field('lead_time');
// then display the date relative to that lead time
echo date('F Y', strtotime('+'.$lead_time.' weeks'));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment