• tta

    (@tykho)


    Hello,

    I’m working on a site where certain posts should be able to be “locked” (by clicking a radiobutton/checkbox in edit post, saving to postmeta), until 15:00:00 the same date it was posted.

    One would think I’d just schedule the post to 15:00:00, but the thing is that it’s supposed to show when it was first created/published (let’s say 10:40:00), and not say it was published at 15:00:00.

    I’ve been looking around, trying to figure it out, but haven’t come up with anything that works. Preferably it would be taken care of in the query, since I don’t want to be messing about with the results and filtering out certain posts afterwards, since it could mess up the pagination and such I suppose.

    I guess I could run a cronjob every day at 15:00, updating all posts that have the “after_15” meta key set to TRUE to FALSE. And in my post query just query all that has it set to false. But then it’s doing things outside of the wordpress installation and other people eventually (or myself in the future) messing around in the code would have to know of it. Perhaps one could put a cronjob in a plugin or something..

    Can anyone point me in the right direction?

  • The topic ‘Display post after certain timestamp (not schedule post)’ is closed to new replies.