This paper focuses on a model for opinion dynamics, where the influence weights of agents evolve in time. We formulate a control problem of consensus type, in which the objective is to drive all agents to a final target point under suitable control constraints. Controllability is discussed for the corresponding problem with and without constraints on the total mass of the system, and control strategies are designed with the steepest descent approach. The mean-field limit is described both for the opinion dynamics and the control problem. Numerical simulations illustrate the control strategies for the finite-dimensional system.