In Gram-positive bacteria, the peptidoglycan serves as a placeholder for surface display of a unique class of monomeric and polymeric proteins, or pili - the precursors of which harbor a cell wall sorting signal with LPXTG motif that is recognized by a conserved transpeptidase enzyme called sortase. Since this original discovery over two decades ago, extensive genetic, biochemical and structural studies have illuminated the basic mechanisms of sortase-mediated cell wall anchoring of surface proteins and pili. We now know how LPXTG-containing surface proteins are folded post-translocationally, how sortase enzymes recognize substrates, and how a remnant of the cell wall sorting signal modulates intramembrane signaling. In this review, we will highlight new findings from a few model experimental paradigms and present future prospects for the field.