Limited Time Sale - 10% Discount! Use Code:U5ZBQTEY

The Divi theme includes a custom post type called “Projects”. These projects make it easy to add and organize portfolio type content on your website without having to use posts and the post categories and tags. Projects come with their own taxonomies (project categories and project tags).

However it’s not possible in Divi to change the URL slug of these projects from /projects/ to /houses/ or /paintings/ for example. In this tutorial, we’ll show you how you can easily do this so the URL matches the purpose you’re using the projects for and increase your SEO. We’ll also show you some more advanced options.

The solution simply involves copying and pasting the code below into your child theme’s functions.php file or using a plugin like Code Snippets:

Replace “custom-slug” in the code above with the slug you want to use. Also make sure you remove the first line in the code if you are pasting it below existing code. Declaring PHP twice in the same file will cause an error.

The last thing we need to do is 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.

If you’re looking for an easy and advanced way to display your projects, please have a look at our Divi FilterGrid plugin. This plugin allows you to search, filter your projects by category and tag, display custom fields, display featured or gallery images in a lightbox window and loads more.

 

Creating your own custom post type

Another option from changing the projects slug is to simply create your own custom post type using a free plugin called CPTUI. This plugin makes it very easy to add new custom post types to your site. Are there any advantages to creating your own custom post type instead of simply replacing the Divi projects URL? Lots!

The biggest advantage is that you can also make your own custom taxonomies with the same plugin and add them to your custom post type. You can also add the new taxonomies to your blog posts or other post types, making it possible to search and filter multiple post types using the same taxonomy from a single interface.

For example you could create a recipes custom post type but also a restaurants custom post type and filter both by a new custom taxonomy called ethnicity. The terms of this taxonomy would be German, Italian, Greek, Mexican, etc. Our Divi FilterGrid plugin could then display both recipes and restaurants in the same grid and filter by the “ethnicity” taxonomy (or any taxonomy registered on your site).

The other primary advantage of the CPTUI plugin over simply changing the Divi projects slug is that you would have complete control over the new post type and taxonomies you create. The CPTUI plugin gives you a lot of options for each. For example when creating a new taxonomy you can choose to give it hierarchical support or not. Taxonomies with hierarchical support can have child terms and will display like categories in the admin. Taxonomies without hierarchical support cannot have child terms and will display like tags in the admin.

Whichever option you choose, please keep our Divi FilterGrid plugin in mind for displaying your projects or other custom post types!

Pin It on Pinterest

Share This