Search posts by post author name
This line is likely the issue – $where = ” AND ( atl_posts.post_author = {$authorID} ) “; You are replacing the contents of $where, not changing it. You have to use . before = – $where.= ” AND ( atl_posts.post_author = {$authorID} ) “;