NEVER use WD40 on brake pads - WD 40 is a lubricant and if will affect braking.
Certainly, you're not serious!?
You disassemble the brake - take out the pads, remove them from the Caliper.
Clean off the Calipers of brake dust and dirt from the miles it traveled so you can inspect.,
And during reassembly - using new pads, use a anti-squeal lubricant on the CONTACT point of where the BACK of the pad, goes into the Calipers' Cradle -those fingers of the caliper hold the pad, that is where you use the lubricant.
IF you do the job right - only the BACKS of the pads and the cradle of the Caliper, get the grease to reduce the shake caused by the pads that makes this squeal.
To understand the squeal is to think about it like Fingers on Chalkboard. Rub it just right with enough force, you'll make that shrill noise - so to the grease the backs of the pads help them "dampen" the effect and allow the PAD to track the surface of the rotor more closely without excessive displacement or shake (The rubbing effect is the strumming of the pads against the rotor)