Last active
November 27, 2022 02:07
-
-
Save renventura/062edef103469b1177bc to your computer and use it in GitHub Desktop.
Remove the Projects Post Type from Divi by Elegant Themes
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
<?php //* Mind this opening php tag | |
/** | |
* This will hide the Divi "Project" post type. | |
* Thanks to georgiee (https://gist.github.com/EngageWP/062edef103469b1177bc#gistcomment-1801080) for his improved solution. | |
*/ | |
add_filter( 'et_project_posttype_args', 'mytheme_et_project_posttype_args', 10, 1 ); | |
function mytheme_et_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 | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked great for me. At least from what I can tell so far. I'll try to remember to update this thread if I do come across any issues.