Last active
September 15, 2022 12:10
-
-
Save nextab/63bc90b012fb81f5e9ee3a687be0940e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 );