Hi all, I'm developing an online radio website, using WordPress obviously. I'm using a custom post type called "shows" for each show, and a custom taxonomy "presenters" (heirarchial) for each presenter. I've added a meta box to the "new show" page, which allows presenters to enter the day the show is on (full name format), the start time of the show (format h:mm) and the end time of the show (format h:mm). What I'm trying to do is get the ID of the show (post) that is currently broadcasting and I'm not sure where I'm going wrong. Here is the full code: (functions.php) http://pastebin.com/cevXsgzq Code (markup): Had to use <code> as I can't post links yet The function in question is "current_show()". It's returning 0 no matter what shows are on. Also, I've run into a problem where, if the same show is on two different days, I have to create two different posts for each show. Is there any way around this? Any help is GREATLY appreciated! Thanks.
Not sure I understand the other problem with the post ID, but I can help you with this one: No. You either change the post date to republish the same post, or post it twice. What kind of work around would there be? What do you want it to do?
Thanks for the reply. It's quite complicated, and I probably didn't word it the best. Basically, when I refer to a "show", I mean a new post of post-type "shows". So what I'm looking for is a query to get the ID of the "show", based on the time it is now and the time that's entered in the meta box when creating the "show", i.e. if the the current time is between the start and end times of that show. Thanks for your help.