• Looking to have the ability to post today but have tomorrow’s date… a schedule for tomorrow of sorts.

    Initially I was thinking the_date(‘j’) + 1; but that’s not working at all.

    Can’t find any threads regarding this on the boards and no plugins that handle it. Thoughts?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You want to schedule a post for publication tomorrow? Or publish a post with tomorrow’s date?

    Thread Starter Chuck Reynolds

    (@ryno267)

    not schedule, that works out of the box… I want to post it today but have tomorrow’s date…
    So basically a +1 modifier on the date but have the logic to roll over to the next month if, lets say, they post on the 31st and it would know to show the 1st.

    So basically the schedule for tomorrow goes up today so people can prepare by reading before the work day

    What if you used PHP’s date() function and fed it the post date plus 1 day?

    Thread Starter Chuck Reynolds

    (@ryno267)

    think my syntax is just screwy now…

    got:

    <?php $mynewdate = strtotime($post->post_date) + (60 * 60 * 24); ?>
    <div class="day-<?php echo date('d',$mynewdate); ?>">

    (basically just need day to show up in class name for my css to pop my sprite)

    So what that code is doing is adding 1 to each day so no matter what day it is it always adds one… I just need it to add one to the original post date… and never change..

    Just tried code in one of my themes and it’s working fine as far as I can see. I’m echoing out a two-digit post date+1 day every time. Is that not what you want? Do you need this to be called only on specific posts?

    Thread Starter Chuck Reynolds

    (@ryno267)

    well i’ll build a category template for those posts but yeah only certain category posts are going to have the modifier…

    currently have this working (think, need more testing)

    <?php $mynewdate = strtotime($post->post_date). '+ 1 day'; ?>

    Thread Starter Chuck Reynolds

    (@ryno267)

    after some more testing I realize this original code was working

    $mynewdate = strtotime($post->post_date) + (60 * 60 * 24);

    need to make sure it’s still not adding a day each time… I just think that was a fluke as the client was manually editing post dates w/o me knowing lol

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Modify Post Date to Tomorrow’ is closed to new replies.