Skip to content

Instantly share code, notes, and snippets.

@nextab
Last active September 15, 2022 12:10
Show Gist options
  • Select an option

  • Save nextab/63bc90b012fb81f5e9ee3a687be0940e to your computer and use it in GitHub Desktop.

Select an option

Save nextab/63bc90b012fb81f5e9ee3a687be0940e to your computer and use it in GitHub Desktop.
#region Remove / hide the Projects posttype in backend
function nxt_additional_project_posttype_args( $args ) {
return array_merge( $args, array(
'public' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'show_in_nav_menus' => false,
'show_ui' => false
));
}
add_filter( 'et_project_posttype_args', 'nxt_additional_project_posttype_args', 10, 1 );
#endregion Remove / hide the Projects posttype in backend
@nextab
Copy link
Copy Markdown
Author

nextab commented Feb 22, 2021

If you want to change the permalink of projects, then change the array that will be merged to the following:

...
return array_merge( $args, array(
'slug' => 'your-custom-permalink',
));
}
add_filter( 'et_project_posttype_args', 'nxt_additional_project_posttype_args', 10, 1 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment