We bought an old house earlier this year and the molding it loose in a lot of places. It looks like they used very long, thin nails to attach it originally. They don't seem very effective. How should we reattach the molding?
For that type of heavy softwood trim on drywall, I'd use 2-1/2" 16 gauge gun nails, or get some 2-1/2" hardened trim/casing nails (which are significantly narrower then regular wire nails) and pre-drill through just the trim with a 1/16" bit. You want an inch of penetration into the framing, at least.
Where it contacts the door jamb, 1-1/2" or 2" nails are adequate, but you could use the longer nails as well.
You can also use a few dabs of construction adhesive or silicone against the drywall for better stability.