I don’t believe it was ever illegal for lawyers to advertise. It was considered unethical by the Bar association. Nowadays what’s ethical vs unethical in regard to lawyers.
I was told to avoid lawyers who advertise on TV. Allegedly the best don’t have to advertise.