WordPress.org

Ready to get started?Download WordPress

Forums

Editorial Calendar
[resolved] Only see pending post in sidebar (5 posts)

  1. punkey
    Member
    Posted 1 year ago #

    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?

    http://wordpress.org/extend/plugins/editorial-calendar/

  2. Zack Grossbart
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    Cheers,
    Zack

  3. punkey
    Member
    Posted 1 year ago #

    Hey Zack

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

    Frank

  4. cableboy
    Member
    Posted 1 year ago #

    punkey: where exactly did you add that line?

  5. punkey
    Member
    Posted 1 year ago #

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

    if ($edcal_startDate == '00000000') {
                $args['orderby'] = 'title';
    		$args['post_status'] = 'pending';
            }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.