The atom attached to the benzene ring carries a positive charge or (and) is at the origin of a π bond easy to move: In this case the positions ortho and para are nucleophilic centers (negative partial charge!) as can be seen → here
The atom attached to the benzene ring carries a negative charge or (and) an available electronic pair : In this case, the positions ortho and para can not be nucleophilic centers (positive partial charge!) as can still be seen → here . So we have an attack on the π cloud in meta position.