Improved Jetpack Experience

Jetpack 10.1: Customize Search in Block Editor

A new month has arrived along with a shiny new version of Jetpack that provides an enhanced experience for you and your site visitors.

Continue reading → Jetpack 10.1: Customize Search in Block Editor

Posted in Jetpack News, Releases | Tagged , , , | Comments Off on Jetpack 10.1: Customize Search in Block Editor

Set Your Photography Website Apart with Jetpack

As a photographer, you likely have a portfolio of gorgeous images that dazzle fans and customers. But you need to get those images out there so that everyone can see them.

Building your own WordPress site is a great place to start, and for photographers looking to do even more with their sites, there’s Jetpack. Jetpack will enhance your portfolio with gorgeous, user-friendly photo displays meant to attract new followers and photography fans. It also includes features that help large photos load quickly, which improves user experiences and boosts your search engine ranking.

Today we’re going to look at three specific Jetpack features photographers should use on their website:

  • Photon, which enables photos to load quickly.
  • Carousel, which displays photos in a full-screen carousel.
  • Galleries, which offers options for formatting galleries.

Read on to learn how each one of these options will help your website stand out and draw more attention to your portfolio.

Continue reading → Set Your Photography Website Apart with Jetpack

Posted in Small Business | Tagged , , , , | 7 Comments

How to add JavaScript events to the Carousel view

Add this to your site’s js to enable events such as adding Google Analytics tracking code to individual Carousel slides:

jQuery(document).on( 'jp_carousel.selectSlide', '.jp-carousel-wrap', function( event, slides ) {
	// This is just to show you what values get passed in.  Delete it before going to production.
	if ( window.console ) {
		console.log( this );
		console.log( event );
		console.log( slides );
		console.log( slides[0] );
	}
	// Do whatever extra stuff you want here.
} );

You can read more about it here.

Posted in Code snippets, Tips & Tricks | Tagged , , | Comments Off on How to add JavaScript events to the Carousel view

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:

function jpcarousel_auto_close_comments( $open, $post_id ) {
	$post = get_post( $post_id );

	$days_old = (int) get_option( 'close_comments_days_old' );

	if ( ! $days_old )
		return $open;

	if( $post->post_type == 'attachment' && time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
		return false;
	}
	return $open;
}
add_filter( 'comments_open', 'jpcarousel_auto_close_comments', 10 , 2 );
Posted in Code snippets, Tips & Tricks | Tagged , | Comments Off on Automatically close comments in the Carousel view

How to remove the comment form from Carousel View

Sometimes, you may not want your readers to comment on single images. If that’s the case, you can deactivate comments on all attachment pages and in the Carousel view by adding this code snippet to your theme’s functions.php file:

function tweakjp_rm_comments_att( $open, $post_id ) {
    $post = get_post( $post_id );
    if( $post->post_type == 'attachment' ) {
        return false;
    }
    return $open;
}
add_filter( 'comments_open', 'tweakjp_rm_comments_att', 10 , 2 );
Posted in Code snippets, Tips & Tricks | Tagged | Comments Off on How to remove the comment form from Carousel View

How to remove stylsheets added by Tiled Galleries and Carousel

If you wish to use your own stylesheets instead of the ones that are automatically added to the posts where you’ve inserted a Tiled Gallery, or a gallery using Carousel, you can add the following code to your theme’s functions.php file, or to a functionality plugin.

To remove Tiled Galleries’s stylesheet:

function tweakjp_rm_tiledcss(){
    wp_dequeue_style( 'tiled-gallery' );
}
add_action( 'wp_footer', 'tweakjp_rm_tiledcss' );

To remove Carousel’s stylesheet:

function changejp_dequeue_styles() {
    wp_dequeue_style( 'jetpack-carousel' );
}
add_action( 'post_gallery', 'changejp_dequeue_styles', 1001 );
Posted in Code snippets, Tips & Tricks | Tagged , , , , | Comments Off on How to remove stylsheets added by Tiled Galleries and Carousel
  • Enter your email address to follow this blog and receive news and updates from Jetpack!

    Join 112.8K other subscribers
  • Browse by Topic