Hey Petra,
Sorry it took me a few days to test this.
“search_sql_query” exists several times in the function. Which one should be changed?
It seems to me that the third and final instance is the one you say I should change – but it doesn’t stop pages coming up in the results.
I replaced:
$search_sql_query .= ')';
with:
$search_sql_query .= ") AND $wpdb->posts.post_type <> 'page' ";
Did I change the wrong line, or could it be something else?
Thanks,
David