Skip to content

Instantly share code, notes, and snippets.

@hlashbrooke
Last active January 21, 2023 11:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hlashbrooke/03bd9a2eaf7c5714d271 to your computer and use it in GitHub Desktop.
Save hlashbrooke/03bd9a2eaf7c5714d271 to your computer and use it in GitHub Desktop.
Seriously Simple Podcasting: Modify podcast archive slug
add_filter( 'ssp_archive_slug', 'ssp_modify_podcast_archive_slug' );
function ssp_modify_podcast_archive_slug ( $slug ) {
return 'new-slug';
}
@maenjuel
Copy link

maenjuel commented Jan 9, 2017

I'm setting up Seriously Simple Podcasting for a WordPress site and would like to completely remove 'podcast' from the podcast slug (i.e. website.com/blog/podcast-title). However the following code returned 'podcast' in the URL:

add_filter( 'ssp_archive_slug', 'ssp_modify_podcast_archive_slug' );
function ssp_modify_podcast_archive_slug ( $slug ) {
  return '';
}

I can change the slug to anything else and that works, but an empty slug seems to be overwritten by 'podcast'. Is there a way to completely remove the "podcast" from the URL? Thanks!

@DaliJones
Copy link

Did somebody find a solution?

@alijaffar
Copy link

alijaffar commented Jan 12, 2022

Well, after you implement that function, go to Settings > Permalinks and save it to make sure it works. Worked fine for me based on this - https://support.castos.com/hc/en-us/articles/360018867240-Modifying-podcast-URLs

If you have trouble for some reason, the next easiest solution is to set up a 301 redirect from /podcast/ to a new page or archive your create yourself, e.g. /podcasts/

@chrisglitz
Copy link

chrisglitz commented Jan 11, 2023

Hi, I am unable to remove "podcast" from the URL. I am looking to have the episode page URL to be xyz.com/45 (for example). @maenjuel did you ever find a solution for this? I tried implementing both functions to no avail.

@maenjuel
Copy link

Hi, I am unable to remove "podcast" from the URL. I am looking to have the episode page URL to be xyz.com/45 (for example). @maenjuel did you ever find a solution for this? I tried implementing both functions to no avail.

Unfortunately not @chrisglitz. In the end I didn't investigate the issue further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment