Expiration date on front-end
-
Hi,
Do you now a simple way to add an expiration date option to the front end publisher. I see some code in the php file that adresses the option. But I can’t seem to add it to the file.
I also tried working with “Post Expirator”. But also no succes. Any ideas?
` //Set Post expiration date if has any
if ( !empty( $_POST[‘expiration-date’] ) && $post_expiry == ‘on’ )
{
$post = get_post( $post_id );
$post_date = strtotime( $post->post_date );
$expiration = (int) $_POST[‘expiration-date’];
$expiration = $post_date + ($expiration * 60 * 60 * 24);add_post_meta( $post_id, ‘expiration-date’, $expiration, true );’
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Expiration date on front-end’ is closed to new replies.