Change Divi Projects URL-Permalink

If you find this tweak helpful:


Tweaking Elegant Themes involves creating a child theme and editing PHP and CSS files within a text editor. If you have never done this you may want to read our guide on creating a child theme. All tweaks are written with the assumption that you have a default installation of your theme.  Any tweaks or changes you may have previously made to your theme could affect the outcome of the tweaks on this site. All tweaks should be tested before applying to a live site. 

This tweak changes the URL structure of Divi Projects from /projects/ to whatever you want like /photos/. It’s an easy fix that requires little effort. You can take a shortcut that makes this tweak super easy, but not future proof. I would recommend the long version, especially if this is for a client’s website.

Just so we are all on the same page, when you create a new project in Divi, the URL structure of the project looks like this: That’s if you have pretty permalinks turned on. The tweak below allows you to change projects to anything you want to better match your desired URL structure.


*Updated – I have found a new way to replace the ‘project’ slug without overwriting the entire function, by creating a filter. Same result, but less code. I have updated the tweak below with the new method.

The long but correct way to do this:

Locate the functions.php file in /themes/Divi-child/

If you do not have a child theme set up with a functions.php file, follow this guide.

Copy the following code and place it in the functions.php file:

Change project to whatever you would like the new slug to be and save the file. Go to the WordPress dashboard->Settings->Permalinks and click the update button. That’s it. Any current and all new project URLs will be replaced with the new slug. That’s the long way and is better because when a new version of Divi is released, this will not be overwritten. It’s not completely future-proof though. If Divi changes this function in a new release, you may have to update the code to reflect those changes in the file we just edited.

The short version:

If the above method sounds like too much work, the easier method is to simply make this change in the Divi theme.

Locate the functions.php file in /themes/Divi/

Near line 285 you should see this line:

‘slug’       => ‘projects’,

Change projects to whatever you would like the new slug to be and save the file. If you update Divi in the future, you will have to make this change again because it will almost certainly be overwritten by the update.

* As others have pointed out in the comments, you may have to go to Settings->Permalinks and click on the save changes button for the slug to change.


  1. Thank you for the tweak but it doesn’t work with polylang activated 🙁

    any hack for that ?


    December 16, 2014

    • Sorry Tii. I have no experience with the polylang plugin. Try saving your permalinks and see if that does the trick.


      January 12, 2015

  2. This seems not to work for current projects. When putting this code into the functions.php wordpress can nomore find my old projects.
    New created projects work with the new slug…


    December 29, 2014

    • Make sure permalinks are set to something other than “Default”. You may have to click “Save Changes” again even if they are currently set to Default.


      January 12, 2015

  3. First off: I know I should have used a child theme, but it’s a bit too late now for me to completely rebuild the site! I will do better next time, promise.

    My question: in using the “quick and dirty fix” of simply changing the word Projects to (in my case) Menu – it doesn’t work. Using the “new” URL with the word Menu in it just goes to a 404, but when I manually type in the old url with the word project, it goes to the page as always – so the page is still there, but the URL has not changed.

    Did I miss something? The only place this fix seems to be changing the url is in the page editor view.
    Thanks in advance!


    December 30, 2014

    • Make sure permalinks are set to something other than “Default”. You may have to click “Save Changes” again even if they are currently set to Default.


      January 12, 2015

  4. why not this? add_filter(‘et_project_posttype_rewrite_args’,’custom_rewrite_args’); ?


    January 7, 2015

    • Thanks for the suggestion Ray. Most of the tweaks I post are for my own sites and I share with others to save them the trouble and work. I would certainly not consider myself an advanced programmer. If you have a better way, please share with me and others and I’ll test the results and edit the original post. Thanks!


      January 12, 2015

    • Hi Ray,

      I’m really interested in your example and tried to apply without any success…
      I tried : add_filter(‘et_project_posttype_rewrite_args’, array(‘slug’ => ‘projet’) but it doesn’t work :(.
      Can you, please, give us a working example ?
      I’ve seen that you’ve implemented this functionnality on your website by replacing the permalink structure “project” by “plugins” ;).




      January 26, 2015

  5. I used this on my site to change projects to winners, and it broke all of my project links.

    I deleted the code and everything went back to projects, and works.

    Help? Would love to make this work.



    January 9, 2015

  6. Figured it out, you need to reset your permalinks by hitting ‘save’ in the permalinks setting.


    January 9, 2015

    • Thanks Andrew. Hopefully this helps others who are having issues.


      January 12, 2015

  7. Thank you – It worked for me. I am using the child theme.


    January 16, 2015

  8. At the beginning of this post, it shows Divi version 2.0. Does this tweak work for the latest Divi version 2.2? Thanks.


    February 8, 2015

    • Yes, I just tested and it does work with Divi 2.2.

      Brad (admin)

      February 10, 2015

  9. I tried add_filter(‘et_project_posttype_rewrite_args’, array(‘slug’ => ‘projet’) with Divi 2.2 and it didn’t work.


    February 9, 2015

  10. Brad, Glad I found your instructions. I had a few existing “projects” prior to making this change, Do you think any 301 redirects are required for the Google?



    February 20, 2015

    • Hey Brian. Yes, I would 301 redirect all projects that have already been indexed by Google as well as the /projects/ page itself.

      Brad (admin)

      February 26, 2015

  11. Hi Brad,

    Thank you this great tweak and it works like a charm. However, I am having an issue and wanted to check if you can help. After changing the Slug when I open the portfolio page on my website it given me a Blog type layout, but I want the page(Portfolio) which I have created using the Page Builder to display instead of the Default page which Divi theme uses. Is there any way to do that?

    Thanks in advance for your help.



    March 2, 2015

    • Hey Robby. I hadn’t even noticed this before but you are correct. Whether you change the slug to another word or not in the functions.php file, Divi will not load the page you create. So if you leave it as ‘projects’ and create a page with the permalink /project/, Divi loads an archive page. You can create a page template called archive-project.php and copy the contents of the page.php file, but it will not use the page builder so you’ll have to put your design in html in the template. I’m working on a better solution but in the meantime, you can try the page template solution. Otherwise, if you change your page permalink to anything other than the singular version of the slug you define in the functions.php file, it will work. So if your slug is projects, change the page permalink to /projects/. Not /project/. For portfolio, change the permalink to /my-portfolio/ and it will work.

      Brad (admin)

      March 5, 2015

      • Dear Brad, do you have an idea for the better solution yet?


        July 30, 2019

      • Hello! I’m also curious if this has been updated. I’m having the same issue with /resources and the only way around it is /resource but I’d love the consistency of /resources


        March 31, 2023

  12. It’s working fine, thanks!
    What about the breadcrumb when yoast plugin is activated? Again it is written : Home > Projects …


    March 4, 2015

    • On the fourth line in the code above, if you change ‘Projects’ to whatever you want, it changes the breadcrumb. It doesn’t appear to have any adverse effects but I just did a quick check so no guarantees.

      Brad (admin)

      March 5, 2015

  13. thanks

    Alfred Santos

    March 12, 2015

  14. hey. may be off topic. but is there any chance to create a portfolio which after clicking on each image will take you NOT to a project but an external link?
    We are showing a lot of projects which are externally hosted and it just makes another step to add.
    thank you in advance for help!


    March 27, 2015

    • This applied to the old method
      Try this Mike:
      Open your functions.php file. Search for ‘et_pb_portfolio’. This will take you to the function you need to change. Look for this code under the loop code:
      with our new variable . Within each of your project posts, add a new custom post type called ‘external_url’ and for the value just put the external URL you want to use. Hope this helps! If confused I can write up a full tweak for it.

      Brad (admin)

      March 30, 2015

      • Hi Brad
        Thanks for all your work on this stuff…:)
        I’m trying to do the same as what Mike asked, but I don’t understand this bit:
        “Within each of your project posts, add a new custom post type called ‘external_url’ and for the value just put the external URL you want to use.”
        How and where exactly do I add a new custom post type?


        November 6, 2015

        • Thanks Mark, sorry for the confusion. I believe that comment applied to the old, more complicated method of changing the project URLs. I have a plugin that does exactly what you’re looking for but with posts, not projects: I have plans in the near future to add support for multiple custom post types including projects.

          Brad (admin)

          November 6, 2015

  15. Hi Brad,
    I would like to get the look of
    where some portfolio items are nonclickable (and act as mood pictures where just title shows up on hover)…

    As I can see – they did it with some query in functions.php, or adding new custom field where they change span class – to et_overlay_2

    Do you know how it is done? I like the idea of inserting “mood pictures” in portfolio…

    I know they did some tweaks here:

    $thumb_width ) ? ‘portrait’ : ‘landscape’;

    if ( ” !== $thumb_src ) : ?>
    <div class="et_pb_portfolio_image “>
    <a href="”>
    <img src="” alt=””/>

    thx thx thx


    April 19, 2015

    • they somehow add some query here at line 4430 in functions.php and alow changing span class to “et_overlay_2” which they can style as they want


      April 19, 2015

    • Hey Tino. You’re definitely talking about some pretty extensive tweaking. The easiest approach I can think of would be to use a pseudo class with child selectors. So it would look something like this:
      .et_pb_portfolio_item:nth-child(even) .et_overlay {display: none;}

      .et_pb_portfolio_item:nth-child(even) .et_pb_portfolio_image:hover:after {
      background-color: rgba(255,255,255,0.75);
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      z-index: 5;
      display: block;
      This works and the z-index 5 of the pseudo class sits on top of the z-index 4 of the link, covering it. But it also sits on top of the text within the link, making it look faded. The child selector “even” would apply to all even numbered projects but you could adjust that to your needs. By far the easiest option. Otherwise you’ll have to go in and add a php if statement in the portfolio function removing the tag if a custom field is present. And then just add the custom field to projects you want the link removed from. You could also add your CSS class in here if you wanted to do anything else with these “mood pictures”. Hope this helps!

      Brad (admin)

      April 19, 2015

    • I actually came up with a better solution. In the code above, change the display: none on the first element to z-index: 6;

      .et_pb_fullwidth_portfolio .et_pb_portfolio_image h3 {
      display: inline-block;
      position: relative;
      z-index: 6;

      And then remove the background color from the last element. That hides the link but allows the + circle and Title to sit on top of the overlay. The meta is still slightly visible so you could hide with this:

      .et_pb_portfolio_item .post-meta {
      display: none !important;

      Brad (admin)

      April 21, 2015

  16. thank you! perfect…


    May 6, 2015

  17. Hi Brad,
    following problem: I renamed ‘projects’ into ‘references’. the portfolio url is the single reference url should be the portfolio layout is not displayed as long as the site slug and the projects slug have the same name. any idea?



    May 7, 2015

    • Hi Flo. Can you provide a URL for me to look at so I can understand the problem better?

      Brad (admin)

      May 12, 2015

    • Hi Flo,

      I’ve got the same problem. How did you solved this problem?

      Please let me know!



      November 13, 2018

  18. Hi there. What would I do if I just simply want to remove the project slug. So instead of
    I want it to just be

    Thank you! And also If i am adding new code like the above to my PHP file… where do I put it? I’m assuming I don’t override the below!?

    // Recommended way to include parent theme styles.
    // (Please see
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
    get_stylesheet_directory_uri() . '/style.css',
    // Your code goes below


    May 11, 2015

  19. Hi Brad,

    Having followed the instruction to setup a child theme and successfully managed to change project to my chosen format. I am experiencing an odd issue and wondered if you had come across it. While operating in the child theme on the cms, saving changes doesn’t seem to complete and instead I get a white screen with ‘tag:’, written in the top left corner, I also can’t move past that point and have to hit back on the browser, which means I lose the changes I am trying to make. Ultimately I’m having to change back to the main theme to make content updates.

    Any ideas?


    June 30, 2015

    • Sorry for such a late reply. Are you still having problems with this? I have not tested this tweak with Divi 2.4+. Are you using any version of Divi 2.4 or up?

      Brad (admin)

      July 22, 2015

  20. Works great, thanks!

    Jonathan Dolan

    July 28, 2015

  21. Perfect. It works!


    November 6, 2015

  22. Hey, thanks very much for this.

    Helpful tip for people – this doesn’t work with the One Click Child Theme plugin. Something about the files the plugin creates messes with the code here.

    Creating a child theme manually using the tutorial here and on elegant themes website is super easy and it works. I’m super stoked about this. Thanks again.

    Randall Whitted

    November 26, 2015

  23. Thanks for this! It worked perfectly and saved me lots of time trying to figure this out.

    Candy A

    December 16, 2015

  24. Every time i try to add the code you suggested to the functions php file, I keep getting:
    Parse error: syntax error, unexpected ‘<' in /home/peteli6/public_html/ on line 8003

    I changed projects to slang

    ‘slug’ => ‘slang’,
    ‘with_front’ => false,
    add_filter( ‘et_project_posttype_rewrite_args’, ‘custom_post_name’ );

    So i deleted it and updated the file, but now the site is broken and it continually says:
    Parse error: syntax error, unexpected ‘<' in /home/peteli6/public_html/ on line 8003

    any ideas as to what i am doing wrong?

    Peter Liptak

    January 12, 2016

    • Sorry for the late response Peter. Especially with your site down. This could happen for lots of different reasons. Possibly you didn’t copy everything over. Maybe you already had code in your functions.php file. If so, you need to be careful where you place the code above. Either before or after any other custom functions and make sure the file begins with

      Brad (admin)

      March 15, 2016

  25. Works great! Thank you for this.

    Any chance this could be conditional where the slug is changed based on the Project Category?

    For example, if the category is Toys, the slug would be /toys/pagename and if Books /books/pagename and as a fallback just in case /products/pagename

    Thanks in advance!


    January 20, 2016

    • Hi Chumtarou. I’m not sure if this is possible or not. I’m thinking it would require some major customization

      Brad (admin)

      March 15, 2016

    • Hi

      did you find a solution for this? i’m looking for the same.
      txs, for info



      April 12, 2017

  26. Commenthey brad is there any way to increase the layout width in module


    February 23, 2016

  27. This is a great tip, do you also know how I would rename all the mentions of ‘Projects’ in the admin area of WordPress? I am looking to change Projects to Members and would like to also rename it in the admin area for he client’s ease of use.


    Steve Jewell

    March 2, 2016

  28. Hello,

    It was very useful, now I have my personalised slug for projects! Thanks a lot!


    April 14, 2016

  29. Hi,

    Just added the lines… Now my site is down and can’t get in 🙁

    Is there a processing time or am i f#%*ed?

    grts Nicky


    April 21, 2016

  30. So maybe next time I should not copy in the first en final line (PHP). Site is running again. Projects Slug has changed. PERFECT!

    New question.. Can I make different slugs for Projects?


    Projects => A
    Projects => B

    How to seperate them?


    May 17, 2016

    • Thanks Nicky for the update and sorry for the late response. I think I might have a solution for you if I’m understanding your problem. Install this plugin:

      After installed and activated, go to your permalink settings. The plugin will add a new section for projects. Change /%postname%/ to /%project_category%/%postname%/. Save your changes.

      Create a page titled “Case Studies” with url (or whatever you changed “project” to)

      Create another page with title “Your Category” and make the “Case Studies” page you created above the Parent page. The URL should now be

      On the category page, you can use the portfolio module to show only case studies in that category. When you click on a case study, the url should look like this:

      Then just repeat the process for every new category. Create another page. Make the parent page the /case-studies/ page. And then add the portfolio module and limit it to only that category. Hope this was more helpful than confusing!

      Brad (admin)

      May 26, 2016

    • I’ve also tested this method with my free plugin that creates a new custom post type and everything works.

      Just replace “Case Study” with the new custom post type and in the permalink, replace /%project_category%/ with the name of the taxonomy you create with my plugin. Then on the category pages, you could use my other plugin to display the new custom post type.

      Brad (admin)

      May 26, 2016

  31. Hi Brad

    I just purchased your portfolio post pro and it was a breeze to set up.

    Is there a way to update the project_category slug?

    I’m using the DIVI theme and I’ve successfully updated the project post type to “book-review” from within the functions.php file in my child theme, but I can’t seem to figure out how to update the category slug. Currently when a user clicks on a category link from the post meta they go to

    It would be better if the url were

    Appreciate any leads you can give me.


    Jules Webb

    June 1, 2016

    • Thanks Jules! Glad you like the plugin. The best option IMO would be to create your own custom post type. It’s VERY easy and I have a free plugin that you can use as a template. You literally could do a search and replace on the plugin file and replace the words “recipes” and “recipe” in the plugin with “book review” and “book reviews” and it would work. The only exception would be the slug rewrite would need to be “book-review” (include the dash since it’s a URL). The plugin also creates a category “type” and you could replace that with “review-category”. The best part is that the Portfolio Posts Pro plugin you purchased already will display these custom post types just like they do the projects and the posts. It works on ANY custom post type.

      Brad (admin)

      June 2, 2016

  32. Worked perfectly using Divi Builder 2.6.4 and the latest WordPress.

    Thank you a million


    June 21, 2016

  33. I’m trying to replace the /project/ in the url to whatever category is used.


    but also allow other urls like:
    to be

    Any help would be greatly appreciated.


    July 18, 2016

  34. This works great, thanks!!


    August 9, 2016

  35. Hi after I try to dd that code to functions.php, I am getting this error “Parse error: syntax error, unexpected ‘<' in /home/cadmicroadmin/ on line 53È and now I cant login to my homepag. Give me this errorÈParse error: syntax error, unexpected '<' in /home/cadmicroadmin/ on line 53È. Please help.


    August 11, 2016

    • Hi, i have same problem with you.
      I’ve try many time and found the solution

      Just remove the php syntax and place the code on the end of function.php after ;

      Now, its working for my clients website.

      Thanks a lot Brad for the tutorial 🙂

      Bikin Web

      September 17, 2016

  36. Thanks for share, i will try to use it first.

    Pandu Aji

    September 16, 2016

  37. Thank you – it’s just the way I need it.

    K Hendrawan

    February 9, 2017

  38. Hi Brad,

    I tried this (having no experience with code what so ever) and it messed up my site.

    I was able to restore a back-up but I’m now quite hesistant to try this again.

    Do you offer something like live support where you can have a look at my site or something?




    March 5, 2017

    • Hi Rynout, see my answer below 🙂


      March 17, 2017

  39. Thank you very much, this works perfectly!!

    For anyone who has trouble with the code, you should remove the first and last line as it’s already in your functions file. at the bottom. Any code should be between these (but not double) and it will work :).

    I prefer my slug to be /koppelingen(page)/overige-koppelingen(was:project)/project1

    At this point I changed ‘project’ to ‘overige-koppelingen’ with this code, very helpful! But can I just change it to koppelingen/overige-koppelingen ? Don’t want to brake down my site because of a mistake in the code with the /.


    March 17, 2017

  40. I put the following code in my functions.php file:

    ‘slug’ => ‘produkte’,
    ‘with_front’ => false,
    add_filter( ‘et_project_posttype_rewrite_args’, ‘custom_post_name’ );

    add_action( 'wp_enqueue_scripts', 'my_enqueue_assets' );

    function my_enqueue_assets() {

    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );


    And this works perfectly but if I use Breadcrumbs its still "projects"!

    Any idea?


    July 13, 2017

    • Same for me, I use yoast beradcrumbs and it is still “projects” in the breadcrumbs although the url is the slug I chose (members). How is it possible to change the slug in teh breadcrumbs too ?


      September 12, 2017

    • Same for me. Do you have a workaround for that?


      October 2, 2017

      • Yeah Same for me 🙁

        Still no solution ?


        February 20, 2018

        • Yoast Seo has bradcrumb custom option for projects


          July 4, 2018

  41. Works great. Although the word “Projects” in the left column admin still says “Projects” and not “Bio” (which is what I changed it to. The permalink says /bio/ though, so that’s good.


    October 6, 2017

  42. I am trying for the latest version of the divi but can not. After I remove the code Just succeeded. And the code I put at the bottom of itself after the endif code;

    What I’m asking is correct placement of code like that? thank you


    January 18, 2018

  43. Thanks for the update. The function and filter worked fine for me. Elegant solution if you just need the slug to be modified.

    Jules Webb

    February 2, 2018

  44. This modification crashed my site. Doh. I’m using a child theme, have latest version of Divi (3.2.2) installed.

    Here’s my entire functions.php child theme file:

    add_action( ‘wp_enqueue_scripts’, ‘divichild_enqueue_styles’ );

    // Allow SVG uploads

    function allow_svgimg_types($mimes) {
    $mimes[‘svg’] = ‘image/svg+xml’;
    return $mimes;
    add_filter(‘upload_mimes’, ‘allow_svgimg_types’);

    When I add suggested code in this post to the bottom, it hangs for about 30 seconds then crashes the website. Fortunately I was able to restore a backup functions.php version via FTP, but the site was down. Does the code no longer work in 2018 with latest version of Divi, do I have a conflict?


    May 14, 2018

    • Well a good portion of my php code was stripped from my comment, so it’s not showing all of it. Oh well.


      May 14, 2018

  45. Definitely no longer working in latest release of Divi, just tried the code again without the opening & closing php tags.

    Also in parent Divi theme, the word “projects” does not appear at all in the main functions.php file. I’m wondering if the Divi folks changed things around…


    May 14, 2018

  46. Thank you, this helped me out!


    June 27, 2018

  47. It worked perfectly! Thanks so much. Was very easy to implement.


    July 25, 2018

  48. Yes! Finally something about Field Mill.


    August 22, 2018

  49. No go for me. The code above breaks the divi based site immediately. I am looking for a solution.

    Josh Meckel

    September 25, 2018

  50. Hi, thanks for the code. How can I rewrite the project_tag slug too?


    October 11, 2018

  51. Hey guys, this way works perfectly:

    function change_divi_project(){
    Register_post_type (‘project’,
    ‘labels’ => array(
    ‘name’ => __(‘custom_post_types’, ‘divi’),
    ‘singular_name’ => __(‘custom_post_type’, ‘divi’),
    ‘has_archive’ => true,
    ‘hierarchical’ => true,
    ‘public’ => true,
    ‘rewrite’ => array (‘slug’ => ‘custom_post_type’, ‘with_front’ => false ),
    ‘supports’ => array(),


    add_action(‘init’, ‘change_divi_project’);


    May 9, 2019

  52. add_filter( ‘et_project_posttype_rewrite_args’, ‘wpc_projects_slug’, 10, 2 );
    function wpc_projects_slug( $slug ) {
    $slug = array( ‘slug’ => ‘YOUR-NEW-NAME’ );
    return $slug;

    That works, just copy it into your child funktion php and change YOUR-NEW-NAME


    March 26, 2020

  53. How do I edit the entire project single template? I am trying to use this template alongside advanced custom fields so that I can change the html heading tags in certain places with the dynamic content.

    Whenever I submit a query for dynamic content using divi’s modules, IT DOESN’T let you interact with the HTML at all. I would like to be able to just modify the template file in the child theme which I thought was single-project.php (but this is clearly not it).

    evan drews

    April 15, 2020

  54. Thanks!
    Just added this code using the newest Divi version and it still works!


    April 28, 2020

  55. Thanks, great thing! Any idea why I can’t change the menu_icon in the admin dashboard that way? Tried adding

    ‘menu_icon’ => ‘dashicons-admin-multisite’,

    as argument, but that won’t do the trick. Any ideas?


    October 3, 2020

  56. // Working on Divi 4.8.1
    function wpc_projects_slug( $slug ) {
    $slug = array( ‘slug’ => ‘my-custom-name’ );
    return $slug;
    add_filter( ‘et_project_posttype_rewrite_args’, ‘wpc_projects_slug’, 10, 2 );

    It’s possible to change divi ‘project_category’ url slug?


    January 22, 2021

  57. Hi Axis,

    this works not on 4.8.1 can you please check this again?


    January 30, 2021

  58. I’m using Divi and nothing listed above is working.. Does anyone have anything new to try? Thanks


    February 3, 2021

  59. This is really amazing. You’ve saved me a whole lotta embarrassment. Thanks.


    April 1, 2023

Post a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This