Created
October 20, 2014 14:11
-
-
Save strangerstudios/4fc33f3ee209b9dca00f to your computer and use it in GitHub Desktop.
Use a different slug with PMPro Series.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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