Separating silver (Ag(+)) from lead (Pb(2+)) is one of the many merits of the porous polymer framework reported here. The selective metal binding stems from the well-defined chelating unit of N-heterocycles, which consists of a triazine (C3N3) ring bonded to three 3,5-dimethylpyrazole moieties. Such a rigid and open triad also serves as the distinct building unit in the fully conjugated 3D polymer scaffold. Because of its strong fluorescence and porosity (e.g., BET surface area: 355 m(2)/g), and because of the various types of metal species that can be readily taken up, this versatile framework is especially fit for functionalization. For example, with AgNO3 loaded, the framework solid exhibits a brown color in response to water solutions of H2S, even at the dilution of 5.0 μM (0.17 ppm); whereas cysteine and other biologically relevant thiols do not cause notable change in color. In another example, tunable white-light emission was produced when an Ir(III) complex was doped (e.g., about 0.02% of the polymer weight) onto the framework. Mechanistically, the bound Ir(III) centers become highly emissive in the orange-red region, complementing the broad, bluish emission from the polymer host to result in the overall white-light quality: the color attributes of the emission are therefore easily tunable by the Ir(III) dopant concentration. With this exemplary study, we intend to highlight metal uptake as an effective approach to modify and enrich the properties of porous polymer frameworks and to stimulate interest in further examining metal-polymer interactions in the context of sensing, separation, catalyzes, and other applications.