Last active
December 26, 2015 00:38
-
-
Save amdrew/7065236 to your computer and use it in GitHub Desktop.
Changing the /category/ label in the URL. Eg http://mywebsite.com/downloads/category/ebooks/ to http://mywebsite.com/downloads/cat/ebooks/. Replace "the-new-category-label" with what you'd like.
This file contains hidden or 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
<?php | |
function my_child_theme_edd_download_category_args( $category_labels ) { | |
$slug = defined( 'EDD_SLUG' ) ? EDD_SLUG : 'downloads'; | |
// modify the "the-new-category-label" below to your liking | |
$category_labels['rewrite'] = array('slug' => $slug . '/the-new-category-label', 'with_front' => false, 'hierarchical' => true ); | |
return $category_labels; | |
} | |
add_filter( 'edd_download_category_args', 'my_child_theme_edd_download_category_args' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment