Adjusted query for where clause on home page