Wiring a switch to (2) pendant lights, a ceiling fan (all new)
So the blue wire in your fan fixture is power to the light on the fan. The black wire is power to the fan.

Current code calls for a neutral wire in any switch box, even if you don't use it yet and have to cap it with a wire nut.

If you want to control the lights and the fan independently from the wall switch (so the fan doesn't come on ever time you flip the light switch, and so that you can also run the fan without the light), you need two switches. Here's a simple example:



If you want to control fan with the pull chain

If the power is at the fan, then you want to run 14/3 to the switch. That's the hot wire (use black), the neutral (white) and the return leg of the switch loop (use red).

Connect the black and red wires to the switch, and put a wirenut on the white one (unless you have a switch that uses the neutral).

In the fan box, connect the black wire from the fan, and the black wire from the 14/3 (the switch) to the hot wire into that box. Then connect the red wire from the switch to the blue wire on the fan, and to the 14/2 that you feed the pendant lights with. Connect all the white wires together.

If the power is at the wall switch, then you still need to run 14/3 to the fan.

In the switch box, pigtail and connect hot to the switch and to the black wire in the 14/3. Connect the red wire in the 14/3 to the switch. Connect white to white (neutral).

In the fan box, connect the black from the 14/3 to the black wire in the fan. Connect red to the blue wire and to the 14/2 that you feed the pendant lights with. Connect all the white wires together.

If you want to control the fan and light both from the wall switch

If power enters the circuit at the switch box, run 14/3 to the fan box (two switch legs and the neutral).

Pigtail the hot wire and connect it to both switches (both black screws on the double switch in the picture). Connect the red wire from the 14/3 to one switch (one of the brass screws on the double switch), and the black wire to the other switch. Connect white to white.

In the fan box, connect the blue wire to the red wire from the switch box, and the black wire to the black wire from the switch box. Now one switch will operate the light, and the other will operate the fan.

To control the pendant lights from the light switch, connect the red wire and neutral through to the other lights using 14/2.

If the power is at the fan box, then you have to run 4 wires plus ground to the switch box, so that you can run power, neutral and two return legs to get power back from the switch to the lights and the fan.

You could search around and find some 14/4 cable, or just run 2 14/2 cables from the fan to the switch box and use one of the white wires as the return leg of one of the switch loops. Mark the ends of that wire with black permanent marker or non-white electrical tape.

In this case, the wiring is fundamentally the same, you just have to get power to the switch box because it isn't there already.

Other options

You can also get switches that have one or two potentiometers for fan control and dimming the lights. Or one that has a push pot so you can push it to turn the lights on and off, and turn the knob to control fan speed, and so on. But the wiring is fundamentally the same with these.