We consider the steady flow of a viscoelastic film over an inclined plane featuring periodic trenches normal to the main flow direction. The trenches have a square cross-section and side length 5–8 times the capillary length. Owing to the orientation of the substrate, the film fails to coat the topographical feature entirely, forming a second gas–liquid interface inside the trench and two three-phase contact lines at the points where the free surface meets the wall of the trench. The volume of entrapped air depends on material and flow parameters and geometric conditions. We develop a computational model and carry out detailed numerical simulations based on the finite element method to investigate this flow. We solve the two-dimensional mass and momentum conservation equations using the exponential Phan-Thien & Tanner constitutive model to account for the rheology of the viscoelastic material. Due to the strong nonlinearity, multiple steady solutions possibly connected by turning points forming hysteresis loops, transcritical bifurcations and isolated solution branches are revealed by pseudo-arc-length continuation. We perform a thorough parametric analysis to investigate the combined effects of elasticity, inertia, capillarity and viscosity on the characteristics of each steady flow configuration. The results of our simulations indicate that fluid inertia and elasticity may or may not promote wetting, while shear thinning and hydrophilicity always promote the wetting of the substrate. Interestingly, there are conditions under which the transition to the inertial regime is not smooth, but a hysteresis loop arises, signifying an abrupt change in the film hydrodynamics. Additionally, we investigate the effect of the geometrical characteristics of the substrate, and our results indicate that there is a unique combination of the geometry and viscoelastic properties that either maximizes or minimizes the wetting lengths.