• Resolved Buurable

    (@buurable)


    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 );’

    https://wordpress.org/plugins/users-ultra/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Plugins Area

    (@usersultra)

    Hi Buurable,

    I’m sorry about the delay to get back to you.

    Actually, the expiration date is available on pro. However, you can tweak the code a little bit in order to make it work the way you wish. Just make sure that the expiration date is in “time stamp” format.

    Let me know if that helps a few
    Cheers
    Adrian

    Plugin Contributor Plugins Area

    (@usersultra)

    Please post again if you have any further questions
    Cheers
    Adrian

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Expiration date on front-end’ is closed to new replies.