Created
November 23, 2022 09:05
-
-
Save AndreFCAmorim/b7608a8373cac81ce84011f4b46cb01d to your computer and use it in GitHub Desktop.
Rename the default taxonomy for posts on WordPress
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
<?php | |
add_action('init', 'renameCategory'); | |
function renameCategory() { | |
global $wp_taxonomies; | |
$cat = $wp_taxonomies['category']; | |
$cat->label = 'My Categories'; | |
$cat->labels->singular_name = 'My Categorie'; | |
$cat->labels->name = $cat->label; | |
$cat->labels->menu_name = $cat->label; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment