Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Link to Post Shortcode

// Add Shortcode
function post_link_shortcode( $atts ) {

	// Attributes
	$atts = shortcode_atts(
		array(
			'id' => '',
		),
		$atts,
		'link-to-post'
	);

	// Return only if has ID attribute
	if ( isset( $atts['id'] ) ) {
		return '<a href="' . get_permalink( $atts['id'] ) . '">' . get_the_title( $atts['id'] ) . '</a>';
	}

}
add_shortcode( 'link-to-post', 'post_link_shortcode' );