Day: July 15, 2010
Adding Custom Post Types To get_calendar() And The Calendar Widget
By default or design, the WordPress function `get_calendar()`[^1] does not handle post types other than `post`. I’ve updated it as the standalone function `ucc_get_calendar()` to allow it to accept a `$post_types` array; the included filter function `ucc_get_calendar_filter()` will allow for seamless integration via `functions.php` without requiring additional editing of Theme templates. (Note that the filter will also apply to the Calendar Widget’s output.)
Continue reading “Adding Custom Post Types To get_calendar() And The Calendar Widget”
Adding Custom Post Types To wp_get_archives()
Again with the custom post type extensions. This function lets the native WordPress `wp_get_archives()` [^1] [^2] know about public custom post types; just add it to the `functions.php` of your theme. Of note: the builtin `link` post type can be included at the `array_merge()` point; I just had no use for it.
Continue reading “Adding Custom Post Types To wp_get_archives()”