Created
July 12, 2019 19:47
-
-
Save iamchetanp/154f11beb9a5ad3fc9068840fa8cd2d7 to your computer and use it in GitHub Desktop.
Disable Project Post Type in Divi Theme.
This file contains hidden or 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
/** | |
* Remove portfolio post type from theme | |
* | |
* @param array $args post type array. | |
*/ | |
function cpdivi_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, | |
) | |
); | |
} | |
add_filter( 'et_project_posttype_args', 'cpdivi_et_project_posttype_args', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment