We developed a framework for the hierarchical pathways of bottom‐up (niche dimensionality) and top‐down control (herbivory) on biomass of stream algae via changes in guild composition (relative abundance of low profile, high profile, and motile guilds), species richness, and evenness. We further tested (1) the contrasting predictions of resource competition theory vs. the benthic model of coexistence on how the number of added nutrients constrains species richness, (2) the relationship between species richness and evenness, and (3) the biodiversity–ecosystem‐function paradigm. Implementing a combination of field and lab experiments that manipulated for the first time in benthic algae herbivory and/or niche dimensionality, i.e., the number of added nutrients (NAN), including nitrogen, phosphorus, iron, and manganese, we made the following discoveries. First, important predictors of guild composition were herbivory (field) and NAN (lab); of richness, NAN (field) and NAN and guild composition (lab); of evenness, guild composition (field and lab) and herbivory (field); and of biomass, guild composition, NAN, and richness + evenness (field and lab). Herbivory increased the proportions of the low profile and motile guilds but decreased the proportion of the high profile guild. In the absence of grazing, greater proportions of the high profile guild resulted in elevated richness and biomass but diminished evenness, whereas in the presence of grazing, these relationships generally disappeared. Second, both experiments confirmed the prediction of the benthic model that species richness increases with NAN, a pattern inconsistent with resource competition theory. Third, supplementation with manganese and/or iron increased algal richness, indicating that micronutrients, which have generally been overlooked in stream ecology, added dimensions to the algal niche. Fourth, the richness–evenness relationship, observed only in the absence of herbivory, depended on the size of the species pool. It was positive at richness lower than 49 species (lab), implying complementarity and facilitation, while at higher richness (field and lab), this relationship was negative, consistent with negative interspecific interactions. Finally, the greater dependence of biomass production on guild composition and NAN than on richness and evenness suggests that more comprehensive, environmentally explicit, and trait‐based approaches are necessary for the study of the biodiversity–ecosystem‐function paradigm.