Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created October 20, 2014 14:11
Show Gist options
  • Save strangerstudios/4fc33f3ee209b9dca00f to your computer and use it in GitHub Desktop.
Save strangerstudios/4fc33f3ee209b9dca00f to your computer and use it in GitHub Desktop.
Use a different slug with PMPro Series.
/*
Use a different slug with PMPro Series
If another plugin/page/category is conflicting on the "series" slug/keyword,
you can change the slug used by PMPro Series by adding this code
to your active theme's functions.php or a custom plugin.
Be sure to reset your rewrite rules by going to
Settings --> Permalink Settings in the WP admin dashboard
and then saving for this change to take affect.
*/
function my_pmpros_series_labels($labels) {
$labels['slug'] = 'course-series';
return $labels;
}
add_filter('pmpros_series_labels', 'my_pmpros_series_labels');
function my_pmpros_series_registration($post_type) {
$post_type['rewrite']['slug'] = 'course-series';
return $post_type;
}
add_filter('pmpros_series_registration', 'my_pmpros_series_registration');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment