Set rewrite with_front to false
-
I have a custom structure in my permalinks that looks like this:
/blog/%postname%/
This is so all my blog posts have that prefix.
But the Podcast episodes are inheriting that as well. I read up on it and it seems it’s because when the podcast taxonomy is registered in your plugin there is no argument for rewrite
with_front
so it defaults to TRUE.This is in
/php/classes/handlers/class-cpt-podcast-handler.php
I was able to write this snippet to make it work for my purposes:
function mattc_set_ssp_tax_no_front( $args ) { $slug = apply_filters( 'ssp_archive_slug', __( SSP_CPT_PODCAST, 'seriously-simple-podcasting' ) ); $args[ 'rewrite' ] = array( 'slug' => $slug, 'feeds' => true, 'with_front' => false ); return $args; } add_filter('ssp_register_post_type_args','mattc_set_ssp_tax_no_front');
All that to say… I’d love a setting to ensure the Podcast slug does NOT inherit the site permalink structure if possible.
Other than that, so far so good! Really impressed with this plugin. Thanks!
- The topic ‘Set rewrite with_front to false’ is closed to new replies.