you'll need (5) 4x2mm neodymium magnets to complete each piece. they press into each hole (i just used the side of my leatherman to press them in on a table that i don't care about).
print settings won't matter a ton; you can make them as strong or weak as you like, though i'd suggest at least 2 wall loops. PLA is sufficient.
i came across something like these that held significantly larger magnets than what i had on hand so i made these. these are intended to hold fabric down to the print bed during 3D printing.