Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #569904

    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.

    #569916

    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 );

    #570187

    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Deactivate Portfolio’ is closed to new replies.