First thing for the mantle is to build a base out of 2X4s. I wanted this to overhang an inch on all sides. To build a base you just measure how big you need it and make a kind of box. The one side against the wall, then you add 2X4 the length you need every like foot or 8 inches, what you think you need, for the base to be structurally sound.
Remember to use a drill bit before sinking the screws in or the boards will split. I used 3 inch screws.
We have little slated concrete above the fireplace, so I’m shimming it with a 1/2 inch mdf piece.
I attached the base to the studs. I wanted it a little taller so the molding on the fireplace isn’t covered. So I added an extra piece of pine on top of the base.