Add custom text, HTML at the end of post

Sometimes you want to show custom text or HTML at the end of each post in View, you can do it easily by adding this code to file functions.php of your active theme:

// Content Views Pro - Display custom HTML at end of post
add_action( 'pt_cv_item_extra_html', 'cvp_theme_item_extra_html' );
function cvp_theme_item_extra_html( $post_id ) {
	global $pt_cv_id;
	if ( $pt_cv_id === 'VIEW_ID' ) {
		ob_start();

		// Put the text, HTML or PHP code here

		echo ob_get_clean();
	} // Ensure to put } BELOW the line of ob_get_clean()
}

(Please replace VIEW_ID with ID of your View)

Notice: This task requires your coding skills about PHP, HTML.

Best regards,

Scroll to Top