Support » Plugin: Editorial Calendar » Only see pending post in sidebar

  • Resolved punkey


    Great plugin we’ve been using for quite some time now on our multi-author blog. We have a workflow where authors write posts and put them on “waiting for review”. I would like to see only these posts in the sidebar of the calendarpage. Since my 25 authors also use drafts to work on posts, I don’t want to see those.
    Any way how to toggle this or change something in the code?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Zack Grossbart


    Thanks for using the Editorial Calendar. There’s no setting to show posts that are waiting for review instead of drafts in the unscheduled drafts section, but it shouldn’t be too difficult to change the code.

    If you look in edcal.php on line 559 there’s a function called edcal_posts. This function gets the posts for the main calendar and the unscheduled drafts drawer.

    On line 590 there’s a conditional statement that looks like this:

    if ($edcal_startDate == ‘00000000’) {
    $args[‘orderby’] = ‘title’;

    This sorts the posts in the unscheduled drafts section by title (they are normally sorted by time). You could add an extra argument here to change the post_status field to look for posts which are waiting for review (WordPress calls that status pending).

    I haven’t tried this out, but it should be pretty straight forward.

    Good luck and please let us know how it goes.


    Hey Zack

    That worked like a charm, I added $args[‘post_status’] = ‘pending’; to the lines and it’s done! Thanks!


    punkey: where exactly did you add that line?

    Cableboy, Search for the statement from Zack’s post and change it to

    if ($edcal_startDate == '00000000') {
                $args['orderby'] = 'title';
    		$args['post_status'] = 'pending';
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Only see pending post in sidebar’ is closed to new replies.