Link custom field to post URL

Content Views Pro helps you to show custom fields easily. By default, value of fields will be shown as they were added.
If you want to link a custom field to post URL, please add this code to file functions.php of your active theme:

// CVPro - Link custom field to post URL
add_filter( 'pt_cv_ctf_value', 'cvp_theme_ctf_link_to_post', 100, 3 );
function cvp_theme_ctf_link_to_post( $args, $key, $post ) {
	if ( $key == 'NAME_OF_FIELD' ) {
		$args = sprintf( '<a href="%s">%s</a>', get_permalink( $post ), $args );
	}

	return $args;
}

(Please replace NAME_OF_FIELD with name of your custom field)

Best regards,