New Landing How can we help? Themeforest Theme Support Neighborhood Remove Custom Post Types

Viewing 15 posts - 1 through 15 (of 21 total)
  • #124621
    mrseaves
    Member
    Post count: 6

    Hi

    I’m not using the team, clients, portfolio, jobs or testimonials custom post types. Is there a way to remove them? They are cluttering up the website backend.

    Thanks

    #124676
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit functions.php file of theme.
    Find this code to remove :-
    require_once(SF_INCLUDES_PATH . ‘/custom-post-types/portfolio-type.php’);
    require_once(SF_INCLUDES_PATH . ‘/custom-post-types/team-type.php’);
    require_once(SF_INCLUDES_PATH . ‘/custom-post-types/clients-type.php’);
    require_once(SF_INCLUDES_PATH . ‘/custom-post-types/testimonials-type.php’);
    require_once(SF_INCLUDES_PATH . ‘/custom-post-types/jobs-type.php’);
    require_once(SF_INCLUDES_PATH . ‘/custom-post-types/faqs-type.php’);

    Thanks
    Mohammad

    #125207
    mrseaves
    Member
    Post count: 6

    Thank you!

    #125210
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    – Kyle

    #144915
    iquarius
    Member
    Post count: 32

    Hello Kyle, i want to do this too 🙂 but i have a child theme, how can i disable Dante custom post types from my child theme?

    I work with a child theme so i can have Dante always with current.

    Regards,

    #144975
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You can remove custom post type through theme options settings.
    Thanks
    Mohammad

    #150279
    jsjc
    Member
    Post count: 54

    Hi!

    I am using Neighbourhood Theme too but I do not see any options in the theme configuration to disable Custom Post Types…

    I would like to do it within the Child theme just to keep myself safe from updates.

    Looking forward to your reply!

    #150311
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this custom php code at functions.php of child theme.

    add_action( 'after_setup_theme','sf_custom_post_remove', 100 );
    
    function sf_custom_post_remove() {
    
    remove_action( 'init', 'faqs_register');
    remove_action( 'init', 'clients_register');
    remove_action( 'init', 'jobs_register');
    remove_action( 'init', 'portfolio_register');
    remove_action( 'init', 'team_register');
    remove_action( 'init', 'testimonials');
    }

    Thanks
    Mohammad

    #150577
    jsjc
    Member
    Post count: 54

    Seems that portfolio is and testimonials are not gone yet…

    Widgets get removed automatically too? Are they of any load to theme? I want to make it light because as you know being a complex theme its heavy on server.

    Thanks!!

    #150578
    jsjc
    Member
    Post count: 54

    Sorted!
    remove_action( ‘init’, ‘faqs_register’);
    remove_action( ‘init’, ‘clients_register’);
    remove_action( ‘init’, ‘jobs_register’);
    remove_action( ‘init’, ‘sf_portfolio_register’);
    remove_action( ‘init’, ‘team_register’);
    remove_action( ‘init’, ‘testimonials_register’);

    #150588
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Great. Thanks for sharing the solution.
    -Rui

    #153934
    iquarius
    Member
    Post count: 32

    Hello, i tried to remove a custom post type but this code did not work:

    add_action( ‘after_setup_theme’,’sf_custom_post_remove’, 100 );

    function sf_custom_post_remove() {

    remove_action( ‘init’, ‘faqs_register’);
    remove_action( ‘init’, ‘clients_register’);
    remove_action( ‘init’, ‘jobs_register’);
    remove_action( ‘init’, ‘portfolio_register’);
    remove_action( ‘init’, ‘team_register’);
    remove_action( ‘init’, ‘testimonials’);
    }

    Also, Dante does not have theme options to remove any custom post type

    #154013
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Where did you insert this code?
    Thanks
    Mohammad

    #184076
    iquarius
    Member
    Post count: 32

    Hello Mohammad,

    I pasted this code in the functions.php of both Dante and a child of Dante but the custom post types are still in the admin.

    Please advise,

    #184105
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    @iquarius

    Can you provide admin access to check it?

    -Rui

Viewing 15 posts - 1 through 15 (of 21 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