Update the WP Editorial Calendar Default Options

When you write a lot, using the WordPress post list can be somewhat inefficient. When I’m writing at Sell with WP, I need to schedule posts in advance and get a bird’s eye view of when posts will publish, as well as which gaps I need to fill.

To do this, I use an awesome free plugin called the WordPress Editorial Calendar. This plugin will create a “Calendar” submenu under the posts menu, and will show you a calendar of all posts so that you can see when each is scheduled:

WP Editorial Calendar

I love seeing all posts and being able to just drag and drop them to a different date to reschedule. You can also change the number of weeks and the information displayed under the screen options.

Editorial Calendar Screen Options

Changing Screen Optoins

However, there’s one thing I don’t like: there’s no settings page, so you can changed the default post status or posting time when you create a new post from the calendar itself. I’m okay new posts being created as drafts, but I don’t like that the default time is at 10:00 AM. I checked out the plugin FAQ and found this nugget:

The calendar allows you to create new posts. The default time for this new posts is 10:00 AM and the default status for this new posts is draft. You can change those values by specifying options in your blog.

However, there are no options for most users. Let’s talk about how you can fix this.

Change the Default Post Time with WP Editorial Calendar

When you look at the code, there is an option, but there’s no settings page that you’d get this from.

/**
 * This is the default time that posts get created at, for now 
 * we are using 10am, but this could become an option later.
 */
$this->default_time = get_option("edcal_default_time") != "" ? get_option("edcal_default_time") : '10:00';

Fortunately for us, as long as this code is getting the option, we don’t actually need one – we can set it programmatically. We’ll use the update_option method to do so. Since I’m trying to change the default time, I’ll use the edcal_default_time option that the code above is trying to get with this little snippet:

update_option( 'edcal_default_time', '02:00' );

Easy peasy smile . Now my posts will default to 2:00 AM instead of 10:00 AM when I create a draft using the calendar, and I can remove this snippet (I only need to update it once). You can set any time you want in 24-hour time.

If you did want to change the default post status, you could do that in the same way. Mind the note on the plugin FAQ:

The edcal_default_status property controls the default status for new posts in the calendar. The allowed values are draft, future, and pending for the statuses of Draft, Scheduled, and Pending Review respectively. This value will only be used if the current user doesn't have access to change that status. For example, if you're an author then you can't use a default status of pending since you aren't allowed to publish posts.

So let’s say you wanted to change all posts to Scheduled posts instead of drafts. Your snippet would look something like this:

update_option( 'edcal_default_status', 'future' );

That’s all there is to changing the default post status and default post time with the WP Editorial Calendar. It’s a great tool and I highly recommend it!