We all know how much we preach making a good turn and pivot motion. Well, it is impossible to have proper rotation and rotary movement if you have lateral movement or slide in your swing.
Here is a suggestion: take a lawn chair and place it next to your left hip (if you are right handed) and practice making backswings while keeping your left hip touching the chair. Your swing will feel shorter and tighter, but the slide will go away.
Try this tip to take the slide out of your swing.