Select Page

Change Divi Custom Post Slug “Project”

Home Forums Themes Divi Change Divi Custom Post Slug “Project”

  • This topic has 0 replies, 1 voice, and was last updated 7 years ago by OPTe.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #472

    OPTe
    Keymaster

    If you want to change the default slug for Divi Theme custom post type ‘Project’ i.e. /project/my-post to /MYSLUG/my-post/, activate plugin My Custom Functions
    and use the following code:

    function custom_post_name () {
    return array(
    'feeds' => true,
    'slug' => 'project',
    'with_front' => false,
    );
    }
    add_filter( 'et_project_posttype_rewrite_args', 'custom_post_name' );

    Change the slug from project to your choice. Then head over to permalinks and save the settings to update the database.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.