WP.me Shortlinks

By default, Jetpack generates WP.me shortlinks for each of the following post types:

  • post
  • page
  • attachment

As needed, you can add shortlink support to additional post types. If the post type already exists, you can do this with add_post_type_support():

add_action('init', 'my_custom_init'); 
function my_custom_init() {     
      add_post_type_support( 'custom_post_type', 'shortlinks' ); 
}

You can also add shortlink support when registering the post type, like so:

// Register Custom Post Type
function jetpackme_custom_post_type() { 
	$args = array( 
		'label'    => __( 'Custom Post Type', 'text_domain' ), 
		'supports' => array( 'title', 'editor', 'shortlinks' ),
		'public'   => true
	); 
	
	register_post_type( 'custom_post_type', $args ); 
} 

// Hook into the 'init' action 
add_action( 'init', 'jetpackme_custom_post_type', 0 );