func_button is the entity for the swtich. Set func_brush to "Toggle" and give it a name like "secret_wall" or something.
Go to outputs for button and click "Add". Now for the new output type.
Target: secret_wall
Input: Toggle (or ToggleSolidity, hammer will suggest the right one)
With a parameter override of: (leave that one blank)
Delay: 0.
On button being used by player wall will be nonsolid. If the button is used again, wall becomes solid again. Quite simple.