We demonstrate experimentally the directional emission of light by InAsP segments embedded in InP nanowires. The nanowires are arranged in a periodic array, forming a 2D photonic crystal slab. The directionality of the emission is interpreted in terms of the preferential decay of the photoexcited nanowires and the InAsP segments into Bloch modes of the periodic structure. By simulating the emission of arrays of nanowires with the emitting segments located at different heights, we conclude that the position of this active region strongly influences the directionality and efficiency of the emission. Our results will help to improve the design of nanowire based LEDs and single photon sources.