Oct 20, 2025 1:35 am
Is there a function to fix this in the settings?
1 Reply
Oct 22, 2025 9:02 am
Hi,
Please use the hook code below;
add_filter( 'wpforo_search_sql', function( $sql, $args ){
if( wpfval($args, 'type') === 'titles-only' ){
$sql = str_replace( ' WHERE ', ' WHERE p.`is_first_post` = 1 AND ', $sql );
}
return $sql;
}, 10 ,2 );
Helpful article: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/