Hi There,
As we don’t need the portfolio in a project, we would like to deactivate it. At least clean up wp admin menu.
Any functions.php code for that?
Many Thanks, T.
Forget about it, problem solved with:
function custom_unregister_theme_post_types() {
global $wp_post_types;
foreach( array( ‘portfolio’ ) as $post_type ) {
if ( isset( $wp_post_types[ $post_type ] ) ) {
unset( $wp_post_types[ $post_type ] );
}
}
}
add_action( ‘init’, ‘custom_unregister_theme_post_types’, 20 );
Hey!
Glad you could solve it and thanks for sharing your tip here.
Please feel free to contact us if you have any questions.
Best regards,
Vinay