There’s been a lot of chatter recently about Jetpack for WordPress. Their development team has been hard at work adding new features, all the while some are still frustrated with the “single plugin, many modules” approach, because they only want one or two of the ~20 things that Jetpack offers. I recently wrote an article about how to disable comments in Jetpack’s Carousel module, and I’m still on a Jetpack kick.
Here are a bunch of resources, hacks & other tricks you can use to disable, extend, hide & do other awesome things with the Jetpack plugin.
Use Jetpack Without a WordPress.com Account (aka: Development Mode)
OK, so this one is in their documentation, but it’s too important not to mention.
There are 2 ways you can use Jetpack without connecting to wordpress.com (only use one or the other, not both). Before you do, keep in mind these modules require a WordPress.com account:
- Site Stats
- Likes
- Subscriptions
- Push Notifications
1. Add this to your wp-config.php file
define( 'JETPACK_DEV_DEBUG', true);
2. Use this filter in a custom plugin
add_filter( 'jetpack_development_mode', '__return_true' );
Choose Which Jetpack Modules Are Activated by Default
If you find yourself constantly deactivating the same modules on each new WordPress site you build, this code will come in handy. Add it to a custom plugin. (The following example will only activate the Site Stats module by default.)
function jeherve_auto_activate_modules() { return array( 'stats' ); } add_filter( 'jetpack_get_default_modules', 'jeherve_auto_activate_modules' );
Here’s a list of the slugs to use for all modules:
- after-the-deadline
- carousel
- comments
- contact-form
- custom-css
- enhanced-distribution
- gplus-authorship
- gravatar-hovercards
- infinite-scroll
- json-api
- latex
- likes
- minileven
- mobile-push
- monitor
- notes
- omnisearch
- photon
- post-by-email
- publicize
- sharedaddy
- shortcodes
- shortlinks
- sso
- stats
- subscriptions
- tiled-gallery
- vaultpress
- videopress
- widget-visibility
- widgets
Rob at WP Bacon has a nice little code template with all of the modules pre-filled.
Deactivate All Jetpack Modules by Default
Add this code to a custom plugin:
add_filter( 'jetpack_get_default_modules', '__return_empty_array' );
Completely Hide Modules from the Jetpack Page
Deactivating modules by default might be all you need, but what if you want to completely remove the module from the Jetpack screen all together? This will also mean it is unable to be activated.
Add this code to a custom plugin. (The following example will completely remove the Site Stats module.)
function jeherve_kill_stats ( $modules ) { unset( $modules['stats'] ); return $modules; } add_filter( 'jetpack_get_available_modules', 'jeherve_kill_stats' );
Turn Off Jetpack Publicize’s Auto-Selection of Social Networks
If you’ve connected your social networks through Jetpack Publicize, every time you publish a new post, all of these options are selected by default. If you accidentally publish a post, or perhaps meant to publish the post but didn’t want to post to your social media pages just yet, this code will deselect the publicize checkboxes by default. You’ll have to manually select them each time you add a new post.
Place this code in a custom plugin:
add_filter( 'publicize_checkbox_default', '__return_false');
Add Sharing Buttons to Jetpack
ManageWP.org Share Button
Check out this plugin by Jeremy Herve. It will even respect your choice for official button, text, icon or text + icon.
VK.com Share Button
VK.com is a European social network, similar to Facebook. This plugin will add a share button to Jetpack.
Scoop.it Share Button
Scoop.it is a social sharing site similar to Digg. This plugin will add a share button to Jetpack.
Add Jetpack Share Buttons With [shortcode]
If you use the Sharing module, Jetpack will automatically add share buttons to the end of your posts (and other post types, if you select them in the options). If you want to show the sharing buttons midway through your post, or anywhere for that matter, you can use this plugin. It provides a shortcode for inserting sharing links anywhere inside your post.
Move Jetpack To Bottom of Menu
If you don’t like having the Jetpack menu item above all your content (Posts, Pages, Media, etc.), install the Menu Humility plugin by Mark Jaquith. It will move Jetpack down… where it belongs.
References & Credits
- Jeremy Herve, official Jetpack developer
- Jetpack.me Tips & Tricks – more tips from the official Jetpack website
- Jetpack for Developers – info for theme & plugin developers
- List of all Jetpack hooks (filters & actions)
If you have any other tips or tricks, please let us know in the comments so we can add them here.
We Recommend
https://kinsta.com › wordpress-hosting
Fast and secure infrastructure, worldwide CDN, edge caching, 35 data centers, and enterprise-level features included in all plans. Free site migrations.
https://gravityforms.com › features
Create custom web forms to capture leads, collect payments, automate your workflows, and build your business online. All without ever leaving WordPress.
Leave a Comment