Why aren't my custom post type events showing up on the calendar?

If you're using Pie Calendar to display a post type that's not default to WordPress, there are a few things to look out for.

The post type is excluded from search

When registering a post type, if the exclude_from_search property is set to false, that post type will not be shown on the calendar. If you're trying to use a post type registered by another plugin and don't have immediate access to this setting, you may be able to use the register_post_type_args filter to alter the exclude_from_search property: https://developer.wordpress.org/reference/hooks/register_post_type_args/.


The post type uses a custom post status

By default, Pie Calendar only shows published posts, or posts with the status 'publish'. If your custom post type (or one registered by a third-party plugin) uses a custom post status, it won't show up on the calendar.

You can alter the post statuses allowed on the calendar using this snippet:

add_filter('piecal_event_query_args', 'pc_event_query_args', 10, 2);

function pc_event_query_args( $args, $atts ) {

    $args['post_status'] = 'any'; // This can also be an array of post statuses, such as ['any', 'publish', 'custom']

    return $args;
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.