Category

Uncategorized

  • 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…

  • Automatically close comments in the Carousel view

    You can use the following code to automatically close comments in the Carousel view, based on the number of days you’ve defined in Settings > Discussion:

  • Remove Jetpack Sharing buttons in the Mobile Theme

    You can add the following code to a functionality plugin to remove the Jetpack Sharing buttons in the Mobile Theme: Looking for more mobile tips? You’ll find them here!

  • How to disable specific shortcodes in Jetpack

    Jetpack includes many shortcodes allowing you to embed videos, audio files, images, and other media into your posts. If you want to deactivate a specific shortcode without deactivating the Shortcodes module, you can add the following code to a functionality plugin. Please note that this will not work in a theme’s functions.php file due to the…

  • How to use Photon to serve custom cropped Post thumbnails

    The Photon module resizes your site’s images on the fly, without cropping them. However, in some cases you might want Photon to apply a custom cropping when resizing certain images. In the following example, we will use photon to serve Post thumbnails with custom cropping, and use a different cropping on single pages: Reference

  • How to add a custom Open Graph image tag to your home page

    When you share a post on Facebook, or when Jetpack Social auto-shares a post to your Facebook page, Facebook crawls the page and looks for Open Graph meta tags to build a complete post preview (with an image, title, description, …). Jetpack automatically creates these meta tags for you, so you don’t have to worry…

  • Photon and Themes

    Theme crafters often ask whether Photon — the free Image Content Delivery Network module in Jetpack — can be used to speed up page loads and save on bandwidth when delivering images from their themes. The short answer: Yes! Read on for the how-to.

  • Add Infinite Scroll to search result pages

    Note: This snippet is no longer needed as Jetpack includes Search Pages by default now. By default, Infinite Scroll is only active on your site’s home page as well as on the archive pages. You can, however, use the infinite_scroll_archive_supported filter to add support to other pages:

  • How to insert another plugin before the Jetpack sharing buttons

    Jetpack sharing buttons are added immediately after the post content. In some cases, you may want to insert a new element between your post content and the sharing buttons. To control whether that element will appear before or after the Jetpack sharing buttons, you will have to change the priority of the filter. In the…

  • How to use your own resources in the sharing module

    The sharing module includes an “advanced” option, allowing you to use your own JavaScript and CSS files instead of the files added by Jetpack by default. To get started, go to Settings > Sharing in your dashboard, and check the “Advanced” checkbox at the bottom of the page. Then, you can add your own libraries…