A local Orthodox rabbi told me that while most of the decisions in the Shulchan Aruch were based on taking the majority of the Rambam, Rosh and Rif (all of whom he claimed supported laying tefilin on Chol HaMoed), the Shulchan Aruch ruled against laying tefilin on Chol HaMoed based on the ruling of the Zohar.
Where does the Shulchan Aruch say this? Why did he apparently deviate from his normal rule of psak?