WordPress.org

Ready to get started?Download WordPress

Forums

Post Expirator
Posts being removed a day early (3 posts)

  1. garyjparmstrong
    Member
    Posted 1 year ago #

    Hi,
    I have post set to show on the homepage as well as a "listings" page elsewhere on the site. When I set the expiration date for a post, it stays on the listings page for the correct length of time before expiring, but it is removed from the homepage a day early. Why is this, how can I fix it?

    Thanks!

    http://wordpress.org/extend/plugins/post-expirator/

  2. garyjparmstrong
    Member
    Posted 1 year ago #

    <?php

    $expirationdatets = get_post_meta($post->ID,'expiration-date',true);
    $timestamp1 = date("l d F", $time_delete);
    $timestamp = date("l d F", $expirationdatets );
    $timestamp2 = date("D jS M", $expirationdatets );
    if($timestamp1!= $timestamp){?>

    This seems to be the offending part.
    Even though on the post I have the expiration date/time set to 23:59 on the 5th of July, it's removed at 00:01 on the 5th of July. Likewise for all posts.

  3. Aaron Axelsen
    Member
    Plugin Author

    Posted 1 year ago #

    This may be a silly question, but have you verified that the time / date on your host system is correct?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.