/*Change Project Post Type Slug*/ function ds_divi_modify_project_post_slug() { return array( 'feeds' => true, 'slug' => 'new-slug', /*Change text between brackets*/ 'with_front' => false, ); } add_filter( 'et_project_posttype_rewrite_args', 'ds_divi_modify_project_post_slug' ); /*Change Project Category slug*/ function ds_divi_modify_project_catagory_taxonomy() { // get the arguments of the already-registered taxonomy $project_category_slug_args = get_taxonomy( 'project_category' ); // returns an object // make changes to the args // in this example there are three changes // again, note that it's an object $project_category_slug_args->show_admin_column = true; $project_category_slug_args->rewrite['slug'] = 'new-category-slug'; /*Change text between brackets*/ $project_category_slug_args_args->rewrite['with_front'] = false; // re-register the taxonomy register_taxonomy( 'project_category', 'project', (array) $project_category_slug_args ); } // hook it up to 11 so that it overrides the original register_taxonomy function add_action( 'init', 'ds_divi_modify_project_catagory_taxonomy', 11 ); /*Same as above but changes the slug of the Project Tag*/ function ds_divi_modify_project_tag_taxonomy() { // get the arguments of the already-registered taxonomy $project_tag_slug_args = get_taxonomy( 'project_tag' ); // returns an object // make changes to the args // in this example there are three changes // again, note that it's an object $project_tag_slug_args->show_admin_column = true; $project_tag_slug_args->rewrite['slug'] = 'new-tag-slug'; /*Change text between brackets*/ $project_tag_slug_args_args->rewrite['with_front'] = false; // re-register the taxonomy register_taxonomy( 'project_tag', 'project', (array) $project_tag_slug_args ); } // hook it up to 11 so that it overrides the original register_taxonomy function add_action( 'init', 'ds_divi_modify_project_tag_taxonomy', 11 );