Updated where clause sql to uphold post status and post author conditions while searching the taxonomy