Hook of the Month: Customize Modules, Shortcodes, and Widgets

Whether you’re a blogger, a business owner, or a developer – Jetpack comes with many different features you can use to build your site, write your posts, and promote them. However, you may not use all of these features. This month, we’ll discover how to use filters to customize the list of features added by Jetpack.

Photo: Andrewfhart / Flickr

Photo: Andrewfhart / Flickr

Use filters to customize the Jetpack features available on your site

Posted in Code snippets, Tips & Tricks | Tagged , , , , , | 1 Comment

Jetpack 4.0: WP 4.5 Customizer compatibility and more

The new Jetpack introduces improvements for better performance under the hood and to allow you work faster.

Real-Time Widget Customizing

WordPress 4.5 shipped with a new feature, Selective Refresh: if your theme supports it, widgets refresh in the Customizer as you edit them, letting you see changes instantly without refreshing the entire page.

We’ve updated Jetpack widgets to leverage Selective Refresh, and now they’ll update in real time as well!

VideoPress Made Simpler

A new tool lets you edit VideoPress shortcodes right in the Editor, with a fancy new modal window containing key playback options:

VideoPress modal in Editor

Plus, videos placed in the Editor now adjust themselves to your theme’s content width, so you can more accurately see how it will look in your post or page when published.

WooCommerce Sharing

Use WooCommerce? You just got sharing options for each of your products:

Jetpack sharing buttons placed below "Add to cart" button

Social icons are now placed under the “Add to cart” button in singular product views, making it easier for customers to share your products with their friends and fans on social media.

First-Time User Support

We’ve done a better job explaining the benefits of Jetpack and connecting it to WordPress.com when the plugin is installed but not yet connected.

We also added handy links to shortcode documentation to convey the types of media you can quickly and safely embed.


Jetpack protect helps safeguard your site against brute-force attacks, and now it’s got more muscle behind it. We’ve updated the code and routines that verify your site is protected to be more efficient. For folks using the Contact Form module, sweeping spam submissions out of your database is now faster.

And there’s more

Custom Content Types: a new CSS class on Testimonial featured images — has-testimonial-thumbnail — allows you to customize Jetpack custom post types as you see fit.

Theme Tools: improved schema.org microdata for breadcrumbs gives search engines an easier time knowing what page they are on, and how that page relates to the other pages in your site hierarchy.

Widget Visibility: get granular with your widget display:

Widget Visibility UI

Select widgets and specify to show or hide them right from custom post types, in both single and archive views.

We also fixed some issues…

  • Comments: we fixed a mistake where a comment subscription checkbox appeared on custom post types — despite the fact you couldn’t actually subscribe to those types of comments.
  • Contact Forms: we fixed a bug where the telephone field (which can only be added manually) rendered incorrectly, breaking some forms in the process.
  • General: we blocked direct access to the Jetpack_IXR_Client class which caused fatal PHP errors in some server setups.
  • Shortcodes: we removed the frameborder attribute in the YouTube embed code. It was deprecated in HTML 5. Unminified responsive-videos.min.js in order to address a false positive virus alert in ClamAV. Expect it to be re-minified in 4.0.1 once we resolve the issue with ClamAV.

Thanks to everyone who contributed to 4.0:

Alex Kirk, Barry Abrahamson, Bernhard Reiter, Biser Perchinkov, Brando Meniconi, Brandon Hubbard, Brandon Kraft, Christopher Finke, Dan Walmsley, Derek Smart, Drew Butler, Elio Rivero, Enej Bajgoric, George Stephanis, Igor Zinovyev, Ivan Kristianto, Jeff Golenski, Jeremy Herve, Jesse Friedman, Joey Kudish, Lance Willett, Matt Wiebe, Michael Cain, Miguel Lezama, Mohammad Jangda, Patrick Rauland, Philip John, Richard Muscat, RC Lations, Rocco Tripaldi, Sam Hotchkiss, Tammie Lister, Thomas Guillot, Weston Ruter.

Update April 21, 2016

We’ve released 4.0.2 that fixes a fatal error that was caused by Jetpack not being able to find a library directory.

Posted in Releases | Tagged , , , , | 4 Comments

Jetpack 4.0 beta now available!

The Jetpack mechanics have been engineering a fresh new Jetpack version. It’s currently in beta and you can grab it right now joining the Jetpack Beta Program.

Here are some highlighted features of this version that need to be tested.

Continue reading → Jetpack 4.0 beta now available!

Posted in Releases | Tagged , , , | Comments Off on Jetpack 4.0 beta now available!

How to change the size of the thumbnails in the Top Posts widget

The Top Posts widget offers different options to display a list of posts, or a grid of post thumbnails. In some cases, you might want to change the size of the thumbnails used by this widget.

To do so, you’ll need to change the size parameters in the image source, by adding the following code to your theme’s functions.php file, or to a functionality plugin:

function jeherve_custom_thumb_size( $get_image_options ) {
        $get_image_options['avatar_size'] = 600;

        return $get_image_options;
add_filter( 'jetpack_top_posts_widget_image_options', 'jeherve_custom_thumb_size' );

You can add some custom CSS to overwrite Jetpack’s default CSS. You can paste this CSS in your theme’s stylesheet, or under Appearance > Edit CSS in your dashboard:

.widget_top-posts .widgets-list-layout li > a {
    width: 40%;

.widget_top-posts .widgets-list-layout img.widgets-list-layout-blavatar {
    max-width: 240px;
    width: 100%;

.widget_top-posts .widgets-list-layout div.widgets-list-layout-links {
    max-width: 100%;
    width: 55%;

@media only screen and (max-width: 1019px) {

    .widget_top-posts ul.widgets-list-layout {
        max-width: 600px;
        margin: 0 auto;

    .widget_top-posts .widgets-list-layout div.widgets-list-layout-links {
        font-size: 24px;
Posted in Code snippets, Tips & Tricks | Tagged , | Comments Off on How to change the size of the thumbnails in the Top Posts widget
  • Recent Comments

    Matt on Let’s Get Visual: Five J…
    Jeremy on Jetpack 4.3 and 4.3.1: A faste…
    Jeremy on Jetpack 4.3 and 4.3.1: A faste…
    Jeremy on Jetpack 4.3 and 4.3.1: A faste…
    Jeremy on Jetpack 4.3 and 4.3.1: A faste…
  • Archives

  • Enter your email address to follow this blog and receive notifications of new posts by email.

  • Install Jetpack to see our lineup of features.

    Install Jetpack Now

    Don’t need all Jetpack’s features? No problem. Only activate what you need!