Transporting a ladder in a pickup truck makes it difficult to carry anything else. The sheer size of a ladder will take up most of the room in the bed of the truck, leaving no room for the rest of your cargo. The best bet is to attach a ladder rack to the bed of the truck to get your ladder up high, leaving room to transport tools and materials.
Building vs Buying
Truck racks can usually be purchased and installed by a professional dealer. These racks are often made of metal and can cost a bundle (especially if you have to get it professionally installed). Luckily, if you are handy with wood, you can build your own ladder rack for much cheaper than it would be to buy one. Wood is durable enough to withstand the weight of the ladders, and because of the way you can attach it, it can be easily removed (this is nice if you don't want to drive your rack around all the time).
The best thing to do is to determine the size of the rack. The rack size will be different for all trucks as it will depend on the size of the truck bed and how tall the top of the truck cab is. These measurements will form a "box" (length times width times height). Once you know the dimensions, start building.
Cut your height pieces first. These will need to be about 1 to 2 feet higher than the top of the truck bed. The reason is that the ladder will lay on top of the rack and be supported by the top of the cab. Making sure the height of these beams is higher than the cab will allow the sides of the ladder to be supported.
While you can make this entire contraption out of 2-by-4, a better solution might be to use 4-by-4. The 4-by-4 will give the structure better overall support. One you have four of these of equal length, cut four pieces of 2-by-4, two of which are the length of the bed and two of which are the width of the bed. Attach these to the 4-by-4 posts so when the box is placed in the bed of the truck, they are even with the top of the cab.
Attaching it to the Truck
Now that the structure is complete, you will need a way to attach to the truck. Since you made it the same size as the bed, it should fit nicely into the corners. When you close the truck gate, it shouldn't slide out because it will have nowhere to go. However, to be safe, drill some "L" brackets into the rails of the truck bed and then screw the rack into the "L" brackets. This will keep the rack from moving around and make it more stable.