Skip to content

How To Display Or Hide Selected Modules In Jetpack

I really like WordPress’ Jetpack module, and I have installed it in all my WordPress websites. I really use bunch of Jetpack modules, but there are hand of off modules which are completely useless for me. I really have no plans to use Jetpack’s Beautiful Math plugin any time soon.

If you don’t want to use some specific or just want to use some specific modules, then you can easily display or hide selected modules in Jetpack.

Display Specific Modules

If you just want to display Stats, Omnisearch and Minileven(Mobile Theme) modules, just add following snippet to your current theme’s functions.php file:

function tweakjp_only_stats ( $modules ) {
    $return = array();
    $return['omnisearch'] = $modules['omnisearch'];
    $return['stats'] = $modules['stats'];
    $return['minileven'] = $modules['minileven'];
    return $return;
}
add_filter( 'jetpack_get_available_modules', 'tweakjp_only_stats' );

Hide Specific Modules

If you want to hide Beautiful Match module from appearing in the Jetpack, add following snippet to your current theme’s functions.php file:

function tweakjp_disable_stats ( $modules ) {
    unset( $modules['latex'] );
    return $modules;
}
add_filter( 'jetpack_get_available_modules', 'tweakjp_disable_stats' );

Leave a Reply

Your email address will not be published. Required fields are marked *