Immiscible fluid-fluid displacement in porous media is of great importance in many engineering applications, such as enhanced oil recovery, agricultural irrigation, and geologic CO2 storage. Fingering phenomena, induced by the interface instability, are commonly encountered during displacement processes and somehow detrimental since such hydrodynamic instabilities can significantly reduce displacement efficiency. In this study, we report a possible adjustment in pore geometry which aims to suppress the capillary fingering in porous media with hierarchical structures. Through pore-scale simulations and theoretical analysis, we demonstrate and quantify combined effects of wettability and hierarchical geometry on displacement patterns, showing a transition from fingering to compact mode. Our results suggest that with a higher porosity of the 2nd-order porous structure, the displacement can keep compact across a wider range of wettability conditions. Combined with our previous work on viscous fingering in such media, we can provide a complete insight into the fluid-fluid displacement control in hierarchical porous media, across a wide range of flow conditions from capillary- to viscous-dominated modes. The conclusions of this work can benefit the design of microfluidic devices, as well as tailoring porous media for better fluid displacement efficiency at the field scale.