Skip to main content
How to Change Divi's Default Project Slug

Learn how to change Divi's default project slug to enhance your site's SEO, branding, and navigation with custom URLs.

Updated over a week ago

Customizing your WordPress site's URLs can enhance its SEO and make it more user-friendly. In Divi, each project post type comes with a default slug of project, which may not always align with your site's branding or organizational structure.

Changing the default project slug allows you to create more descriptive, relevant, and memorable URLs for your portfolio items.

This article will walk you through the steps to modify Divi's default project slug, helping you improve your site's navigation and SEO.

Note: A Divi Child theme must be installed and activated to preserve customization after the Divi theme is updated.

  1. After installing and activating a Divi Child theme, go to WordPress Dashboard β†’ Appearance β†’ Theme Files Editor

  2. Open the functions.php file from your Child theme

  3. Add this PHP code at the end of the file:

    function et_projects_custom_slug( $slug ) {
    $slug = array( 'slug' => 'books' );
    return $slug;
    }
    add_filter( 'et_project_posttype_rewrite_args', 'et_projects_custom_slug', 10, 2 );

  4. In the above PHP code, the default project slug will be changed to books. You can change the word books in the above code to match your requirements.

  5. Go to WordPress Dashboard β†’ Settings β†’ Permalinks

  6. Click on the Save Changes button

    WordPress Permalinks
Did this answer your question?