For a conventional closet layout 22"-24" is less than marginal on the depth for hanging coats unless it is for kids, I guess if is just for storage you could pack them in.
Do you need a linen closet? Bath room closets are often used for linens, cleaning products, bath products or some combination of those.
If you really need it for coats and shoes think of alternative layouts, instead of having horizontal coat hanger rod across the entire width of the closet, you could mix it up have a steel hanger bracket that is mounted on and protrudes from the back of the closet at an angle with notches for the hangers to hook on. Think about some of the clothing racks you see at department stores against walls where the fronts of the coats are toward you as you face the wall.
Then you could use up the rest of the space with an organizer for shoes that goes up one side of the closet.
Just an idea...