Are you using the Divi Projects for something other than projects? You may want to change the permalink (or URL) to say something other than โprojectโ.
Youโll need to use a child theme and paste the following into the functions.php file.
The code below will change “Projects” to “Case Studies”. Just change 3 lines below to whatever you like.
/* Change the Divi Project Post Type Name and Slug BEGIN */
function dbc_projects_custom_slug($args) {
$slug = 'case-studies';
$slug = sanitize_title($slug, 'project');
if (is_array($args) && !empty($slug)) {
$args['slug'] = $slug;
}
return $args;
}
add_filter('et_project_posttype_rewrite_args', 'dbc_projects_custom_slug');
function dbc_projects_custom_name($args) {
$name_singular = 'Case Study';
$name_plural = 'Case Studies';
if (isset($args['labels']) && is_array($args['labels'])) {
if (!empty($name_plural) && $name_plural !== 'Projects') {
$args['labels']['name'] = esc_html__($name_plural, 'et_builder');
$args['labels']['search_items'] = esc_html__("Search {$name_plural}", 'et_builder');
$args['labels']['all_items'] = esc_html__("All {$name_plural}", 'et_builder');
}
if (!empty($name_singular) && $name_singular !== 'Project') {
$args['labels']['singular_name'] = esc_html__($name_singular, 'et_builder');
$args['labels']['add_new_item'] = esc_html__("Add New {$name_singular}", 'et_builder');
$args['labels']['edit_item'] = esc_html__("Edit {$name_singular}", 'et_builder');
$args['labels']['new_item'] = esc_html__("New {$name_singular}", 'et_builder');
$args['labels']['view_item'] = esc_html__("View {$name_singular}", 'et_builder');
}
}
return $args;
}
add_filter('et_project_posttype_args', 'dbc_projects_custom_name');
/* Change the Divi Project Post Type Name and Slug END */