Snippets
Change resource slug
A guide on how to change the /resource/
slug prefix in Chipmunk.
Paste this code into the Child Theme’s functions.php file (you can find the base for it here). Make sure you activate the child theme instead of the main Chipmunk package.
functions.php
function chipmunk_register_post_type_args($args, $post_type)
{
if ("resource" === $post_type) {
$args["rewrite"]["slug"] = "podcast"; // Set your new slug here
}
return $args;
}
add_filter("register_post_type_args", "chipmunk_register_post_type_args", 10, 2);
Please remember to refresh the WordPress permalinks after that! Go to Settings > Permalinks and click Save Changes
.
Was this page helpful?