I've got a project that includes a WiFi shield, an LCD and a button.
When I wire my switch to pin 2, it works as expected - while the switch is pressed, the state is LOW and actions can happen in the loop. When I wire my switch to pin 11 or 12 (and change buttonPin to 11 or 12 in the sketch), when I press it, the state then stays LOW forever, even when I release it.
I am currently using pin 2 for Data 7 on the LCD and I can't work out why they behave differently.
Also, with the wifi shield, can I still use pins 11, 12 and 13 as input / output pins ? Or does the shield need them like it does 10 and 7 ?