Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Last active June 29, 2016 11:16
Show Gist options
  • Save thecodepoetry/78007bc5b82a840c529b to your computer and use it in GitHub Desktop.
Save thecodepoetry/78007bc5b82a840c529b to your computer and use it in GitHub Desktop.
un register custom post type in the7 theme
if ( !class_exists('Presscore_Inc_Testimonials_Post_Type') ) {
class Presscore_Inc_Testimonials_Post_Type {
public static function register() {
return;
}
}
}
@thecodepoetry
Copy link
Author

Add this code to your theme's or child theme's functions.php, it will disable The7 testimonials, you can follow the same approach for other custom post types also.

Happy coding !

@thecxguy
Copy link

close but not quite. Revised syntax and it worked.

if ( !class_exists('Presscore_Inc_Testimonials_Post_Type') ) {
...
}

@thecodepoetry
Copy link
Author

Thanks, updated

@rovente
Copy link

rovente commented Jun 29, 2016

This is the correct one, at this time:

if ( ! function_exists( 'presscore_mod_portfolio' ) ) {

    function presscore_mod_portfolio() {
        return;
    }
    presscore_mod_portfolio();

}

if ( ! function_exists( 'presscore_mod_testimonials' ) ) {

    function presscore_mod_testimonials() {
        return;
    }
    presscore_mod_testimonials();

}

if ( ! function_exists( 'presscore_mod_team' ) ) {

    function presscore_mod_team() {
        return;
    }
    presscore_mod_team();

}

if ( ! function_exists( 'presscore_mod_logos' ) ) {

    function presscore_mod_logos() {
        return;
    }
    presscore_mod_logos();

}

if ( ! function_exists( 'presscore_mod_benefits' ) ) {

    function presscore_mod_benefits() {
        return;
    }
    presscore_mod_benefits();

}

if ( ! function_exists( 'presscore_mod_albums' ) ) {

    function presscore_mod_albums() {
        return;
    }
    presscore_mod_albums();

}

if ( ! function_exists( 'presscore_mod_slideshow' ) ) {

    function presscore_mod_slideshow() {
        return;
    }
    presscore_mod_slideshow();

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment