New Landing How can we help? Themeforest Theme Support Dante Remove custom post type in childe theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #94171
    slackerzz
    Member
    Post count: 18

    Hi, i was trying to remove some custom post type in my child theme.
    For example, if i want to remove the “Testimonials” post type, how can i do it?
    Can you help me please?

    Thank you

    #94258
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use given below code.

    add_action( 'after_setup_theme','remove_test', 100 );
    function remove_test() {   
    global $wp_taxonomies;
        $taxonomy = 'testimonials-category';
        if ( taxonomy_exists( $taxonomy))
            unset( $wp_taxonomies[$taxonomy]);
        remove_action( 'init', 'testimonials_register');    
    }

    Hope that should work and let me know your feedback.
    Thanks 🙂
    With Best Regards
    Swift Ideas

    #94274
    slackerzz
    Member
    Post count: 18

    I’ve added your code to my functions.php but it isn’t what i want.
    Maybe i wasn’t clear, i would like to remove from the admin panel some custom section, like, for example, “Testimonials” or “Portfolio”.
    Thank you

    #94286
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I gave code to remove Testimonials and it should work 100%.
    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register