Change the “No posts found” message

Since Content Views 3.7.0

When using our shortcode, you can change this message in Display Settings >> Others:

When using our blocks in Gutenberge editor, you can change this text in the Layout panel:

Content Views 3.6.4 and before

To customize that message, please add this code to file functions.php of your active theme:

// Content Views Pro - Change the "No posts found." message
add_filter( 'pt_cv_content_no_post_found_text', 'cvp_theme_no_post_found_text', 100, 1 );
function cvp_theme_no_post_found_text( $args ) {

	$args = 'Custom text here';

	// In case you want to set custom text for specific views
	global $pt_cv_id;
	if ( $pt_cv_id === 'VIEW_ID_1' ) {
		$args = 'Custom text';
	}
	if ( $pt_cv_id === 'VIEW_ID_2' ) {
		$args = 'Custom text';
	}
	// End

	return $args;
}

(please replace VIEW_ID_1, VIEW_ID_2 with ID of your View)

Best regards,

Scroll to Top