The widely spread iCub humanoid robot has proved to be able to walk straight forward by means of an offline pattern generator, which did not allow for online adjustments and interactions. In this paper, we present a closed-loop control framework based on a Nonlinear Model Predictive Control pattern generator with feedback at the Center of Mass (CoM) position. This framework allows us to extend the walking capabilities of iCub to different walking directions, such as curved, sideways and backward walking. When compared to existing methods, the walking speed of iCub is increased by approximately 75% and the step period decreased by 45%. It was successfully tested with a reduced version of the iCub (HeiCub), but it was also shown to be applicable to the full iCub in simulation. The measured outcomes of the experiments are the walking velocity, the cost of transport, tracking precision of the Zero-Moment Point (ZMP), CoM and joint trajectories. The online feedback was shown to improve the walking stability by means of an improvement of the CoM tracking precision by 30% and the ZMP tracking precision by 60% compared to the same method without CoM position feedback control.