Skip to content

Instantly share code, notes, and snippets.

Last active December 6, 2021 12:34
What would you like to do?
Seriously Simple Podcasting: Add blog categories to podcast episodes (frontend).
add_action( 'pre_get_posts', 'ssp_add_podcast_to_category_archives' );
function ssp_add_podcast_to_category_archives( $query ){
if( is_admin() ) {
if( $query->is_tax('category') || $query->is_category()) {
$query->set('post_type', array( 'post', 'podcast' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment