Well, you are not going to believe this... I had the same issue with my S4 Wifi connectivity as most everyone here and got an idea from one of the posts that I read, after trying virtually everything else.
I have two replacement batteries, but I had starting using the original Samsung battery...