Use a stud finder to locate the framing studs on the walls on each side of the rod holders. Mark the positions of the studs. In most modern homes, the studs are 16 inches apart. Remove the rod holders from the closet walls, using a drill and driving bit.
Measure and mark a 1-by-4-inch plank so it is 2 inches longer than the distance between the studs. Use a carpenter's square to draw a perpendicular cutting line across the plank. Trim the plank. Measure, mark and cut a second plank to the same length.
Mark one wall 2 inches below the desired height of the installed closet rod. Measure and mark the opposite closet wall at the same height. Position one trimmed plank horizontally on a closet wall with its lower edge aligned to the reference mark on the wall, centered to the wall-stud marks. Drill two evenly spaced pilot holes in through the plank into each framing stud. Screw the planks to the wall, using 2-inch drywall screws. Repeat to install the remaining plank on the opposite wall.
Mark one plank where you intend to install the center of a rod holder. Measure and note the distance from the adjacent wall to the mark. Measure and note the distance from the floor to the mark. Transfer these measurements to mark the installed plank on the opposite wall.
Position one rod holder on an installed plank, centered to the reference mark. Pass the tip of a pencil through each screw hole on the rod holder to mark their positions on the plank. Repeat to mark the screw-hole positions on the plank installed on the opposite wall. Drill a pilot hole through each screw-hole mark.
Reposition the rod holder on a plank, aligning the screw holes and pilot holes. Using the screws from the previously installed rod holder, screw the rod holder to the plank. Repeat to install the remaining rod holder on the opposite plank.
Measure and note the distance between the inner surfaces of the installed rod holders. Measure and mark the closet rod to that length. Trim the closet rod, if necessary. Hang the closet rod onto the rod holders.