If you want to use a DTH 11 with ESP8266, I suggest you look for the appropriate link because in this topic I am showing you how to use an ultrasonic sensor.
Another thing I think I should do, download this link is (below) the library for ESP8266 http://arduino.esp8266.com/stable/package_esp8266com_index.json.
In the site this indicated the procedure that must follow to install, but if you have doubts please write here again.
I also do not recommend using the ESP8266 with Arduino to measure humidity and temperature because you can do this with no problem using only ESP8266 and DHT11.
See in the drawing a simple way to connect the DHT11 in ESP8266, Search here that you will find several code, search for ESP8266 + DH11, if you do not find any, please let me give you a code
I hope I can solve it but if not, we are here to help until you can.