Skip to content

Commit 0c5e982

Browse files
authored
Merge pull request #177 from OpenSourceOrg/add/174-podcast-template
Added a custom permalink slug for podcasts
2 parents 74325d9 + a964937 commit 0c5e982

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

themes/osi/functions.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,3 +507,17 @@ function osi_handle_supporter_form_flamingo_spam_status_change( string $new_stat
507507
}
508508
}
509509
add_action( 'transition_post_status', 'osi_handle_supporter_form_flamingo_spam_status_change', 10, 3 );
510+
511+
/**
512+
* Modify the post type arguments for the podcast post type.
513+
*
514+
* @param array $args The post type arguments.
515+
*
516+
* @return array The modified post type arguments.
517+
*/
518+
function osi_ssp_register_post_type_args( $args ) {
519+
$args['rewrite']['slug'] = 'ai/podcast';
520+
$args['rewrite']['with_front'] = false;
521+
return $args;
522+
}
523+
add_filter( 'ssp_register_post_type_args', 'osi_ssp_register_post_type_args', 10, 1 );

themes/osi/templates/template-no-header-title.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
/**
33
* Template Name: No Header with Title
4+
* Template Post Type: post, page, podcast, board-member, license, meeting-minutes, press-mentions, event, supporter
45
*
56
* @link https://codex.wordpress.org/Template_Hierarchy
67
*

0 commit comments

Comments
 (0)