Texture mapping with nodes on walls
You have to unwrap your wall: In the 3D view, in Edit mode, select your whole mesh and press U, and choose for example Smart UV Project or Cube Projection option, then in the Node Editor plug the UV output of your Texture Coordinate node into your Image Texture node, then in UV/Image Editor, rotate or scale the parts of mesh you want so that the bricks appear correctly in your 3D view.