Recently, geometric phases of nonlinear coherent and squeezed states have been investigated by Yang et al (2011 J. Phys. B: At. Mol. Opt. Phys.44 075502). In this paper, after a modification of Yang et al's derivation procedure, we deduced the non-cyclic and non-unitary geometric phases of nonlinear coherent and nonlinear squeezed states with a new approach which is consistent with the nonlinear coherent states theory. Indeed, the most important distinguishable feature of our presentation lies in the fact that we employed the (nonlinear) Hamiltonian which appropriately generates the time evolution of nonlinear coherent and squeezed states. It is established that this modification directly affects the resultant geometric phases of the states under consideration. As a physical realization, we applied our formalism to a particular nonlinear physical system corresponding to the centre-of-mass motion of a trapped ion coherent state. Then, the variation of the geometric phases of the considered nonlinear states in terms of time, intensity of radiation field, squeezing and Lamb–Dicke parameters are investigated. Finally, we discuss our numerical results.