Customizing the Seriously Simple Podcasting Plugin

When setting up the podcast for my wife’s business, I applied the following customizations to the Seriously Simple Podcasting plugin for WordPress:

Disable Podcast Feed Stylesheet

By default the plugin applies an XSL stylesheet to the podcast RSS feeds which make them look like the podcast landing page which might confuse some users. The following filter can be used to disable the stylesheet:

// Disable the podcast RSS XSL stylesheet.
add_filter( 'ssp_enable_rss_stylesheet', '__return_false' );

Remove Permalink Prefix from Podcast Post Type

By default the podcast post type used for episodes (which is linked to the series taxonomy) includes the front prefix of your permalinks. For example, if the permalinks are set to /blog/%postname% then the podcast episode permalinks would be /blog/podcast/%postname% which might not be desirable.

Use the following filter to remove the prefix (by setting the with_front to false) and also adjust permalink slug to something custom:

add_filter( 
	'register_podcast_post_type_args', 
	function ( $args ) {
		$args['rewrite'] = [
			'slug' => 'show', // Change `podcast` to `show` in episode URLs.
			'with_front' => false, // Remove the default prefix.
		];

		// Optional: Disable the post type archive.
		// $args['has_archive'] = false;

		return $args;
	}, 
	100
);

Uncomment the line with has_archive to disable the post type archive (showing all episodes across all registered podcasts) since we already have the dedicated archives for each podcast series.

Adjust the Podcast Series Permalink

As mentioned above, each podcast series is represented by the series taxonomy (which appears as podcasts in the URLs) so the default landing page for the podcast series is /blog/podcasts/podcast-title where /blog is the permalink prefix (if any), podcasts is the label of the series taxonomy and podcast-title is the series term slug.

Most sites use a dedicated page for their podcast landing page such as /podcast so you can adjust the permalink of the specific term ID to point to your custom page instead:

add_filter( 
	'term_link', 
	function ( $url, $term, $tax ) {
		// Redirect the `podcast-series-slug` term to the `podcast` page.
		if ( 'series' === $tax && 'podcast-series-slug' === $term->name ) {
				return get_permalink( get_page_by_path( 'podcast' ) );
		}

		return $url;
	}, 
	10, 
	3 
);

Note that the example above is very fragile as it would break whenever somebody changes either the podcast series slug or the corresponding page slug. It would be better to expose this as a term meta setting that stores the corresponding post ID.

Leave a Reply