Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This question already has an answer here:

I am trying to force publish 'future' or 'scheduled' posts, and I am having trouble

The reason I am asking is because I am creating a site that allows users to do the editing on the front of the site, so I need a button that will allow users to force publish scheduled posts.

Right now I am just trying to find a process or idea that works consistently, and all I have come up with is this:

1) Adjust the scheduled time to the past 2) Changing post status from future to draft 3) Change draft back to scheduled 4) Server realizes the scheduled post time has past and marks it published

Needless to say this isn't ideal. For other status changes I was able to use the status button seen here: Publish pending article from front end with a button? .

I am at a loss on this one because I can't even get the process working on the backend I have looked around a great deal and see that others have had similar problems (e.g. http://core.trac.wordpress.org/ticket/8368) but cannot find a solution. Asking the community for any ideas?

share|improve this question
add comment

marked as duplicate by toscho Feb 5 at 18:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 0 down vote accepted

I've done it. Here is the post with answers on publishing a post marked as scheduled. Been running the code for 2 years on the site in question and it's reliable.

Marking future dated post as published

share|improve this answer
    
Thanks for the reply, I will try to implement your code on the frontend and see how it goes –  Kyle Nov 27 '12 at 17:08
    
The code goes in functions.php and on any save of post publishes those that are scheduled. –  curtismchale Nov 28 '12 at 0:28
    
I ended up changing the route used to accomplish my goal (rather than relying on future publish to do my task, I used schedule_event), so I cannot confirm using your function on the frontend. Thank you for the reply though. –  Kyle Nov 29 '12 at 18:10
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.