We consider shunting inhibitory cellular neural networks with inputs and outputs that are chaotic in a modified Li-Yorke sense. The original Li-Yorke definition of chaos has been modified such that infinitely many periodic motions separated from the motions of the scrambled set are now replaced with almost periodic ones. Another principal novelty of the paper is that chaos is obtained as solutions of differential equations (neural networks) which are perturbed chaotically. To construct the original chaos, the special set of piecewise continuous postsynaptic currents is applied. It is shown that a control can be realized for the extended chaos in an effective way. This is the first time in the theory of neural networks that the Ott-Grebogi-Yorke control method is used to stabilize almost periodic motions. Our techniques can be performed to investigate chaotic dynamics in human brain activities, communication security, combinatorial optimization problems and control of legged robots. The results of this paper were announced in the 5th International Conference on Nonlinear Science and Complexity (August 4-9, 2014, Xi'an, China) and in an International Conference on Nonlinear Dynamics and Complexity (May 11-15, 2015, La Manga, Spain). (C) 2015 Elsevier B.V. All rights reserved.