Change the “No posts found” message

When there is no posts match the filter settings of View, the “No posts found” message will be shown.
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