I am attempting to build my own gate for an 40 inch break in the fence so that my deck could be fully enclosed. I bought a self-closing latch that says the max weight it could hold is about 50 pounds which is probably double what the closing gate is going to weigh. I was going to attach the latch to a piece of cedar that will run vertically parallel next to a deck post. My question is, is cedar a poor choice of wood to attach a latch to since it is a soft wood and may cause the gate to become lopsided after some time had passed?
Your question sort of conflates two different issues. One is sagging and the other is the strength required to support the gate and hold the hardware. The latch should never really be supporting weight. It's rating reflects the load at which it could be damaged if things do sag, but long before it's damaged, you'll find yourself lifting the gate by hand to be able to work the latch, or the latch fasteners could break out of the wood.
Gate's sag if they lack a solid frame. Just a piece of diagonal framing to supplement two horizontal boards won't prevent sagging. You can add a diagonal tensioner that you can tighten, but you will need to periodically tighten it more, and those tend to eventually warp the gate. The way to do it right is to start with a frame that can't sag. This video describes one way to do it: https://www.youtube.com/watch?v=3Wiw22GRgX0. There are also heavy-duty metal framing kits and braces to which you can attach a simple wooden frame to hold the gate material.
Once you have a gate that won't sag, you can attach it with hinges on one side and a latch on the other. You normally attach to fence posts, so you're attaching to sturdy framing on both sides (fence post and gate frame).
Cedar is very soft. When it weathers, it gets even softer. On the hinge side, you should be fastening to structural pieces. If you are adding a cedar board to match appearance, fasten through the cedar into something substantial (fence post or gate frame). Cedar isn't really the best choice for the gate frame; you're better off attaching cedar "appearance" boards to a frame made of something more substantial. But if the frame is cedar, I agree with Lee Sam, bolt through it.
The latch is a different story. If you build the gate right and mount it right with adequate hinges, there should never be any real stress on the latch. The gate side of the latch is normally mounted to the gate framing (or through appearance boards and into the framing). The other side of the latch normally attaches to a fence post (or through an appearance board and into the fence post).
If you are thinking about a cedar board the thickness of a typical picket, the stress on the latch isn't the issue. Cedar pickets really degrade when they weather. In a number of years, there may not be enough solid wood left to hold that end of the latch. Bolting through a picket would be better, but you should really fasten into something more solid for permanence.
Ideally, the fence should end on each side of the opening at a fence post, and the gate should be sized to fill the gap between those posts. There shouldn't be a need to fasten things to thin boards. If you are retrofitting a gate to a fence that does extend past the fence posts, use a solution that doesn't require doing structural things with thin, decorative boards. There are many options, for example:
- Trim existing boards that extend beyond the posts so you are starting with a clean opening. You may even be able to attach the trimmed piece to the gate to minimize the appearance of a change in pattern.
- Remove boards that extend past the fence post, and attach them to the gate frame (the frame being sized for the opening between the posts). You'll see part of the fence post when the gate is open, but won't be able to see a change in the pattern when the gate is closed.
- Secure another structural board to the fence post behind the extended decorative board. Fasten through the decorative board into the structural one.
Cedar is not acceptable to mount gate latch, clasp, strike, on it, unless it’s “through bolted”.
To me, “through bolted” means installing a bolt (machine bolt) through the entire cedar board and secure it with a washer and nut. You may need a washer on both sides of the fastener, depending on what/how much it’s supporting.
If this is not acceptable (seeing the nut and washer on both sides of the fence/gate), then I’d build a frame out of 2x4 SFP and mount the cedar boards to it and mount the device to the frame too.