In animals, RFX transcription factors govern ciliogenesis by binding to an X-box motif in the promoters of ciliogenic genes. In Caenorhabditis elegans, the sole RFX transcription factor (TF) daf-19 null mutant lacks all sensory cilia, fails to express many ciliogenic genes, and is defective in many sensory behaviors, including male mating. The daf-19c isoform is expressed in all ciliated sensory neurons and is necessary and sufficient for activating X-box containing ciliogenesis genes. Here, we describe the daf-19(n4132) mutant that is defective in expression of the sensory polycystic kidney disease (PKD) gene battery and male mating behavior, without affecting expression of ciliogenic genes or ciliogenesis. daf-19(n4132) disrupts expression of a new isoform, daf-19m (for function in male mating). daf-19m is expressed in malespecific PKD and core IL2 neurons via internal promoters and remote enhancer elements located in introns of the daf-19 genomic locus. daf-19m genetically programs the sensory functions of a subset of ciliated neurons, independent of daf-19c. In the male-specific HOB neuron, M acts downstream of the zinc finger TF EGL-46, indicating that a TF cascade controls the PKD gene battery in this cell-type specific context. We conclude that the RFX TF DAF-19 regulates ciliogenesis via X-box containing ciliogenic genes and controls ciliary specialization by regulating non-X-box containing sensory genes. This study reveals a more extensive role for RFX TFs in generating fully functional cilia.