Woody plants host diverse communities of associated organisms, including wood-inhabiting fungi. In this group, host effects on species richness and interaction network structure are not well understood, especially not at large geographical scales. We investigated ecological, historical and evolutionary determinants of fungal species richness and network modularity, that is, subcommunity structure, across woody hosts in Denmark, using a citizen science data set comprising > 80 000 records of > 1000 fungal species on 91 genera of woody plants. Fungal species richness was positively related to host size, wood pH, and the number of species in the host genus, with limited influence of host frequency and host history, that is, time since host establishment in the area. Modularity patterns were unaffected by host history, but largely reflected host phylogeny. Notably, fungal communities differed substantially between angiosperm and gymnosperm hosts. Host traits and evolutionary history appear to be more important than host frequency and recent history in structuring interactions between hosts and wood-inhabiting fungi. High wood acidity appears to act as a stress factor reducing fungal species richness, while large host size, providing increased niche diversity, enhances it. In some fungal groups that are known to interact with live host cells in the establishment phase, host selectivity is common, causing a modular community structure.