• Hello,

    We are using a tool to import Events. When importing, we would also like to set an expiry date. Is it possible to do this programmatically?

    Thanks in advance!
    -Kevin

    • This topic was modified 4 years, 7 months ago by kevinbrands.
Viewing 2 replies - 1 through 2 (of 2 total)
  • yes, this is the basic code for its:

    	$opts = array('expireType'=>"private", 'id'=>$post_id);
    	$ts = get_gmt_from_date("$year-$month-$day $hour:$minute:0",'U');
    	_scheduleExpiratorEvent($post_id,$ts,$opts);
    
    Dominic

    (@shifudominik)

    @tazir where should I paste the code from You to automatically set the expire date of posts?

    Dominic

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set expiry date programmatically’ is closed to new replies.