Support

Account

Home Forums General Issues Using date picker to set post expiry date Reply To: Using date picker to set post expiry date

  • Hi @lerq

    The easiest way is to edit the code WIHIN your loop. This could would normaly display the title, link, excerpt for the post.

    Just add some logic that compares the date value to today. Something like this:

    
    <?php 
    
    $today = date('Ymd');
    $expire = get_field('expire');
    
    if( $expire < $today )
    {
    	// skip this loop
    	continue;	
    }
    
    ?>
    

    Thanks
    E